CN108255674A - multi-process browser process log collecting method, device and mobile terminal - Google Patents
multi-process browser process log collecting method, device and mobile terminal Download PDFInfo
- Publication number
- CN108255674A CN108255674A CN201711496256.6A CN201711496256A CN108255674A CN 108255674 A CN108255674 A CN 108255674A CN 201711496256 A CN201711496256 A CN 201711496256A CN 108255674 A CN108255674 A CN 108255674A
- Authority
- CN
- China
- Prior art keywords
- shared drive
- mutual exclusion
- daily record
- exclusion lock
- browser
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F9/526—Mutual exclusion algorithms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Computer Hardware Design (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present application discloses a kind of multi-process browser process log collecting method, device and mobile terminal, is related to browser technology field.The method includes:The the first process creation shared drive and mutual exclusion lock of browser, the filec descriptor of shared drive and mutual exclusion lock are sent at least one second process of browser by the first process, the second process of target in first process or at least one second process obtains the mutual exclusion lock and locks, the shared drive pointed by filec descriptor is written into process daily record, journal file is written in process daily record in shared drive by the first process, to be uploaded to server by the journal file.The application is in a manner that mutual exclusion lock and multi-process share one piece of shared drive, to solve the problems, such as multi-process browser process log collection difficulty and influence browser normal operation.
Description
Technical field
This application involves browser technology field, more particularly, to a kind of multi-process browser process log collection side
Method, device and mobile terminal.
Background technology
Mobile terminal, such as mobile phone have become one of most common consumer electronic product in people's daily life, make
Web page browsing is carried out with the browser of mobile terminal, has had changed into the primary demand of most people.After navigator product publication
It is necessarily required to collect relevant process daily record and upload onto the server, for carrying out error analysis or collapse analysis, but it is right
In multi-process browser, process log collection is difficult and easily influences the normal operation of browser.
Invention content
In view of the above problems, present applicant proposes a kind of multi-process browser process log collecting method, device and shiftings
Dynamic terminal, to solve the problems, such as multi-process browser process log collection difficulty and influence browser normal operation.
In a first aspect, the embodiment of the present application provides a kind of multi-process browser process log collecting method, the method
Including:The the first process creation shared drive and mutual exclusion lock of browser;First process retouches the file of the shared drive
It states symbol and the mutual exclusion lock is sent at least one second process of the browser;First process is described at least one
The second process of target in second process obtains the mutual exclusion lock and locks, and it is signified that process daily record is written the filec descriptor
To the shared drive;Journal file is written in the process daily record in the shared drive by first process, with logical
It crosses the journal file and is uploaded to server.
Second aspect, the embodiment of the present application provide a kind of multi-process browser process log collection device, described device
Including:Creation module, for the first process creation shared drive and mutual exclusion lock of browser;Sending module, for described first
The filec descriptor of the shared drive and the mutual exclusion lock are sent at least one second process of the browser by process;
Process daily record writing module obtains institute for the second process of target in first process or at least one second process
It states mutual exclusion lock and locks, the shared drive pointed by the filec descriptor is written into process daily record;File writing module,
Journal file is written into the process daily record in the shared drive for first process, to pass through the journal file
It is uploaded to server.
The third aspect, the embodiment of the present application provide a kind of mobile terminal, including display, memory and processing
Device, the display and the memory are couple to the processor, the memory store instruction, when described instruction is by described
Processor processor execution above method when performing.
Fourth aspect, the embodiment of the present application provide a kind of the computer-readable of program code that can perform with processor
Storage medium is taken, said program code makes the processor perform the above method.
Multi-process browser process log collecting method provided by the embodiments of the present application, device and mobile terminal, first
The the first process creation shared drive and mutual exclusion lock of browser, the first process send out the filec descriptor of shared drive and mutual exclusion lock
It send at least one second process of browser, then the second process of target in the first process or at least one second process obtains
It takes the mutual exclusion lock and locks, the shared drive pointed by filec descriptor is written into process daily record, last first process will be shared
Process daily record write-in journal file in memory, to be uploaded to server by the journal file, so as to pass through mutual exclusion lock and more
Process shares the mode of one piece of shared drive, normal to solve multi-process browser process log collection difficulty and influence browser
The problem of operation.
These aspects or other aspects of the application can more straightforward in the following description.
Description of the drawings
In order to illustrate more clearly of the technical solution in the embodiment of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present application, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 shows the flow signal for the multi-process browser process log collecting method that the application first embodiment provides
Figure;
Fig. 2 shows the flow of the multi-process browser process log collecting method signals that the application second embodiment provides
Figure;
Fig. 3 shows the step S230 for the multi-process browser process log collecting method that the application second embodiment provides
Flow diagram;
Fig. 4 shows the step S250 for the multi-process browser process log collecting method that the application second embodiment provides
Flow diagram;
Fig. 5 shows the module frame of the collection device for the multi-process browser process daily record that the application 3rd embodiment provides
Figure;
Fig. 6 shows the module frame of the collection device for the multi-process browser process daily record that the application fourth embodiment provides
Figure;
Fig. 7 shows a kind of structure diagram of mobile terminal provided by the embodiments of the present application;
Fig. 8 shows the movement for performing the multi-process browser process log collecting method according to the embodiment of the present application
The block diagram of terminal.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, the technical solution in the embodiment of the present application is carried out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, those of ordinary skill in the art are obtained every other without creative efforts
Embodiment shall fall in the protection scope of this application.
It is necessarily required to collect relevant process daily record after multi-process browser (such as chromium) product publication (release)
(log), it and is uploaded onto the server for wrong (bug) analysis or collapse (crash) solution, but chromium browsers
Using multi-process framework, including multiple processes such as Browser processes, Render processes and GPU processes, wherein, such as Render
Process is because can not carry out the read-write of file using the process of sandbox mechanism, and therefore, the difficult point of problem is multiple processes such as
What, which writes to relieve oneself inside one piece of caching, uploads onto the server.One is relatively easy to embodiment, such as using ipc communications
Process log information is sent to Browser by the processes such as Render processes or GPU processes by mode by way of ipc communications
Process end, this mode is although easy to implement but exists and occupies I/O processes, can inevitably influence to browse when process daily record is more
The normal operation of device.In view of the above-mentioned problems, inventor studies, and propose provided by the embodiments of the present application more by prolonged
Process browser process log collecting method, device and mobile terminal are stranded with solving multi-process browser process log collection
The problem of difficult and influence browser normal operation, specific multi-process browser process log collecting method is in subsequent embodiment
Middle detailed description.
First embodiment
Referring to Fig. 1, Fig. 1 shows the multi-process browser process log collecting method that the application first embodiment provides
Flow diagram.The multi-process browser process log collecting method is intended to share one piece altogether by mutual exclusion lock and multi-process
The mode of memory is enjoyed, to solve the problems, such as multi-process browser process log collection difficulty and influence browser normal operation.
In specific embodiment, the multi-process browser process log collecting method is applied to multi-process browser as shown in Figure 5
Process log collection device 200 and the mobile terminal 100 for being configured with the multi-process browser process log collection device 200
(Fig. 7).It by taking mobile terminal as an example, will illustrate the idiographic flow of the present embodiment below, it will of course be understood that, the application is implemented
The mobile terminal that example is applied can be smart mobile phone, tablet computer, wearable electric terminal etc., not limit herein.Below
It will be explained in detail for flow shown in FIG. 1, above-mentioned multi-process browser process log collecting method can specifically wrap
Include following steps:
Step S110:The the first process creation shared drive and mutual exclusion lock of browser.
In the present embodiment, the browser is multi-process browser, and first process is with file write capability
Process, such as Browser processes and GPU processes, wherein, the Browser processes are the host process of browser, the GPU into
Journey is a kind of acceleration mechanism of system figure, is an individual process for quickly forming figure synthesis and display.It can manage
Solution, browser on startup, first starts the Browser processes, restarts other processes such as GPU, therefore, as a kind of side
Formula using Browser processes as the first process, on the one hand can ensure that the process daily record of browser on startup can be into row write
Enter, on the other hand can also avoid when browser does not start GPU processes, other process daily records of Render processes can not be written
The problem of.
Further, the first process of the browser initialization when, create shared drive (sharedMemory) and
Mutual exclusion lock (Metex sharedMemory), wherein, the shared drive passes through this shared drive write process day for each process
Will, the mutual exclusion lock are used for the integrality for being used for ensureing shared data operation, and each object both corresponds to one and can be described as " mutual exclusion
The label of lock ", this label be used for ensureing at any one time, can only be there are one the thread accesses objects.
Step S120:The filec descriptor of the shared drive and the mutual exclusion lock are sent to described by first process
At least one second process of browser.
In the present embodiment, the process definition of the shared drive and the mutual exclusion lock will be created as the first process, non-wound
The process definition for building the shared drive and the mutual exclusion lock is the second process, it is possible to understand that, the quantity of first process
Be one, the quantity of second process is at least one, such as first process be Browser processes, second process
It can include other processes such as Render processes, GPU processes.
Wherein, after the first process initiation, at least one second process still in non-started state, when detect to
During the information of any one the second process initiation in few second process, the first process responds described information will be described shared
The filec descriptor of memory and the mutual exclusion lock are sent to second process and preserve.Wherein, by the text of the shared drive
Part descriptor is sent to the second process, can just make the second process that the obtained filec descriptor of the shared drive is mapped to
In the address space of one process, and then the second process could access the shared drive of the first process creation.
As a kind of embodiment, first process passes through interprocess communication ipc (Inter-Process
Communication) by the filec descriptor of the shared drive and the mutual exclusion lock be sent to described at least one second into
Journey.
Step S130:The second process of target in first process or at least one second process obtains described mutual
Reprimand is locked and is locked, and process daily record is written the shared drive pointed by the filec descriptor.
Further, when the first process or any one second process have process daily record output, then apply for the mutual exclusion
Lock, if application passes through, then obtain the mutual exclusion lock and lock, then process daily record is written pointed by the filec descriptor
Shared drive, wherein, the filec descriptor obtains the address space of first process for the process.Specifically,
First process or any one second process can be understood as in browser, preserve the file description of the shared drive
The arbitrary process of symbol and mutual exclusion lock, when the arbitrary process has process daily record to export, then applies for the mutual exclusion lock, wherein,
When there are multiple processes to apply for the mutual exclusion lock, then the mutual exclusion lock is distributed into one of process at random and locked.
It should be understood that after one of process obtains the mutual exclusion lock and locks, other processes can not then obtain the mutual exclusion again
Lock, until the process discharges the mutual exclusion lock.
In the present embodiment, the shared drive uses circle queue, as a kind of mode, when the first process or second into
When any one target process in journey obtains the mutual exclusion lock, completely judge whether the shared drive is write, if institute
It states shared drive not write completely, then continues that process daily record is written the shared drive along circle queue, if described shared interior
It deposits and has write full, the then annular covering shared drive write-in process daily record, so as to avoid shared drive Writing overflow
Problem.
Step S140:Journal file is written in the process daily record in the shared drive by first process, with logical
It crosses the journal file and is uploaded to server.
As a kind of mode, first process can be spaced at preset timed intervals by the process daily record in the shared drive
Journal file is written, can the journal file be written into the process daily record in the shared drive in real time, can also periodically by
Described journal file etc. is written in process daily record in the shared drive, in the present embodiment, does not do specific restriction, wherein,
The journal file can be log.txt.It should be understood that by the process daily record write-in journal file, behind convenience
It is uploaded onto the server.In the present embodiment, it due to the write-in using shared drive progress multi-process daily record, is not take up any
I/O pipelines, solve process daily record write-in efficiency, meanwhile, all processes share one piece of shared drive, ensure that into
The order of Cheng Zhi outputs, shared drive use circle queue, effectively prevent shared drive Writing overflow problem.
The application first embodiment provide multi-process browser process log collecting method, first the first of browser into
Journey creates shared drive and the filec descriptor of shared drive and mutual exclusion lock are sent to browser extremely by mutual exclusion lock, the first process
Few second process, then the second process of target in the first process or at least one second process obtain the mutual exclusion lock and add
The shared drive pointed by filec descriptor is written in process daily record by lock, and last first process is by the process day in shared drive
Journal file is written in will, to be uploaded to server by the journal file, so as to share one piece altogether by mutual exclusion lock and multi-process
The mode of memory is enjoyed, to solve the problems, such as multi-process browser process log collection difficulty and influence browser normal operation.
Second embodiment
Referring to Fig. 2, the stream of the multi-process browser log collection method provided Fig. 2 shows the application second embodiment
Journey schematic diagram.It will be explained in detail by taking mobile terminal as an example for flow shown in Fig. 2 below, the multi-process browsing
Device process log collecting method specifically may comprise steps of:
Step S210:The the first process creation shared drive and mutual exclusion lock of browser.
Step S220:First process is sent out the filec descriptor of the shared drive and the mutual exclusion lock by ipc
It send at least one second process.
Step S230:First process obtains the mutual exclusion lock and locks, and the first process daily record write-in is described shared
Memory.
As a kind of enforceable mode, first process obtains the mutual exclusion lock and is locked first, by first
The shared drive is written in process daily record.It should be understood that during the first process carries out the first process daily record write-in, the
Two processes can not obtain the mutual exclusion lock, and also the second process daily record can not be written.
Referring to Fig. 3, Fig. 3 shows the multi-process browser process log collecting method that the application second embodiment provides
Step S230 flow diagram.It will be explained in detail below for flow shown in Fig. 3, the method specifically can be with
Include the following steps:
Step S231:First process opens first thread.
Specifically, first process enables in first process, new, individual first thread, for carrying out
The write-in of first process daily record.
Step S232:The first thread obtains the mutual exclusion lock and locks, will be described in the first process daily record write-in
Shared drive.
Further, in the first thread, the mutual exclusion lock is obtained by way of reading the mutual exclusion lock and is added
The shared drive is written in first process daily record of the first process by lock, if likewise, the shared drive write it is full,
Then annular covers the shared drive.
Step S240:First process discharges the mutual exclusion lock after the write-in for completing the first process daily record.
It should be understood that after first process completes the write-in of the first process daily record by locking, due to not
It needs that the first process daily record is written again, then discharges the mutual exclusion lock, so that the second process has an opportunity to obtain the mutual exclusion lock.
Step S250:Second process of target obtains the mutual exclusion lock and locks, will be described in the second process daily record write-in
Shared drive.
Further, when second process of target has the second process daily record output, since the first process has discharged institute
Mutual exclusion lock is stated, then the second process of target can apply and obtain the mutual exclusion lock and lock the second process daily record write-in is described common
Enjoy memory.Likewise, during second process of target carries out the second process daily record write-in, the first process or other the
Two processes can not obtain the mutual exclusion lock, can not also carry out the write-in of process daily record.
Referring to Fig. 4, Fig. 4 shows the multi-process browser process log collecting method that the application second embodiment provides
Step S250 flow diagram.It will be explained in detail below for flow shown in Fig. 4, the method specifically can be with
Include the following steps:
Step S251:Second process of target opens the second thread.
Likewise, second process of target opens second line start in second process of target, new, individual
Journey, for carrying out the write-in of the second process daily record.
Step S252:Second thread obtains the mutual exclusion lock and retrieves, will be described in the second process daily record write-in
Shared drive.
Further, in second thread, the mutual exclusion lock is obtained by way of reading the mutual exclusion lock and is added
The shared drive is written in second process daily record of the second process by lock, if likewise, the shared drive write it is full,
Then annular covers the shared drive.
It should be noted that the sequencing between step S220- steps S230 and step S240- steps S250 is in this reality
It applies in example and does not limit, is i.e. step S220- steps S230 can be set to before step S240- steps S250, can also be set
After step S240- steps S250.
Step S260:Second process of target discharges the mutual exclusion after the write-in for completing the second process daily record
Lock.
It should be understood that after second process completes the write-in of the second process daily record by locking, due to not
It needs that the second process daily record is written again, then discharges the mutual exclusion lock, so that the first process or other second processes have an opportunity
Obtain the mutual exclusion lock.
Step S270:Journal file is written in the process daily record in the shared drive by first process, with logical
It crosses the journal file and is uploaded to server.
The multi-process browser process log collecting method that the application second embodiment provides, the first process wound of browser
Build shared drive and mutual exclusion lock, by ipc by the filec descriptor of shared drive and mutual exclusion lock be sent at least one second into
Journey, then the first process and the second process of target obtain mutual exclusion lock respectively and complete the write-in of process daily record, then by first into
Journal file is written in process daily record in shared drive by journey, to be uploaded to server by journal file, wherein, shared drive
The scheme of mutual exclusion lock is added to solve the efficiency of multi-process daily record write-in, and ensure that the order that process daily record uploads,
Further, the problem of write-in of shared drive progress daily record is covered by annular, effectively prevents shared drive Writing overflow.
3rd embodiment
Referring to Fig. 5, Fig. 5 shows the multi-process browser process log collection device that the application 3rd embodiment provides
200 module frame chart will be illustrated below for module frame chart shown in fig. 5, and the multi-process browser process daily record is received
Acquisition means 200 include:Creation module 210, sending module 220, process daily record writing module 230 and file writing module 240,
Wherein:
Creation module 210, for the first process creation shared drive and mutual exclusion lock of browser.
Sending module 220 sends out the filec descriptor of the shared drive and the mutual exclusion lock for first process
It send at least one second process of the browser.
Process daily record writing module 230, for the target in first process or at least one second process
Two processes obtain the mutual exclusion lock and lock, and process daily record is written the shared drive pointed by the filec descriptor.
For first process day is written in the process daily record in the shared drive by file writing module 240
Will file, to be uploaded to server by the journal file.
Fourth embodiment
Referring to Fig. 6, Fig. 6 shows the multi-process browser process log collection device that the application fourth embodiment provides
300 module frame chart.It will be illustrated below for module frame chart shown in fig. 6, the multi-process browser log collects dress
300 are put to include:Creation module 310, sending module 320, process daily record writing module 330 and file writing module 340,
In:
Creation module 310, for the first process creation shared drive and mutual exclusion lock of browser.
Sending module 320 sends out the filec descriptor of the shared drive and the mutual exclusion lock for first process
It send at least one second process of the browser.Further, the sending module 320 includes:Sending submodule 321,
Wherein:
The sending submodule 321, for first process by ipc by the filec descriptor of the shared drive and
The mutual exclusion lock is sent at least one second process.
Process daily record writing module 330, for the target in first process or at least one second process
Two processes obtain the mutual exclusion lock and lock, and process daily record is written the shared drive pointed by the filec descriptor.
Further, the process daily record writing module 330 includes:Mutual exclusion lock acquisition submodule 331, judging submodule 332, covering
Module 333, the first process daily record write-in submodule 334, the first mutual exclusion lock release submodule 335, the second process daily record write-in
336 and second mutual exclusion lock of module discharges submodule 337, wherein:
Mutual exclusion lock acquisition submodule 331 obtains the mutual exclusion lock for first process or the second process of the target
And it locks.
Judging submodule 332, for judging it is full whether the shared drive has been write.
Submodule 333 is covered, if having write full, the annular covering shared drive write-in institute for the shared drive
State process daily record.
Submodule 334 is written in first process daily record, obtains the mutual exclusion lock for first process and locks, by first
The shared drive is written in process daily record.Further, the first process daily record write-in submodule 334 includes:First thread
Opening unit and the first process daily record writing unit, wherein:
First thread opening unit opens first thread for first process.
First process daily record writing unit obtains the mutual exclusion lock for the first thread and locks, by described first
The shared drive is written in process daily record.
First mutual exclusion lock discharges submodule 335, for first process in the write-in for completing the first process daily record
Afterwards, the mutual exclusion lock is discharged.
Submodule 336 is written in second process daily record, obtains the mutual exclusion lock for second process of target and locks, will
The shared drive is written in second process daily record.Further, the second process daily record write-in submodule 336 includes:
First thread opening unit opens the second thread for second process of target.
First process daily record writing unit obtains the mutual exclusion lock for second thread and retrieves, by described second
The shared drive is written in process daily record.
Second mutual exclusion lock discharges submodule 337, and the second process daily record is completed for second process of target
After write-in, the mutual exclusion lock is discharged.
For first process day is written in the process daily record in the shared drive by file writing module 340
Will file, to be uploaded to server by the journal file.
5th embodiment
The 5th embodiment of the application provides a kind of mobile terminal, described including display, memory and processor
Display and the memory are couple to the processor, the memory store instruction, when described instruction is by the processor
The processor performs during execution:
The the first process creation shared drive and mutual exclusion lock of browser;
The filec descriptor of the shared drive and the mutual exclusion lock are sent to the browser by first process
At least one second process;
The second process of target in first process or at least one second process obtains the mutual exclusion lock and adds
The shared drive pointed by the filec descriptor is written in process daily record by lock;
Journal file is written in the process daily record in the shared drive by first process, to pass through the daily record
File is uploaded to server.
Sixth embodiment
The application sixth embodiment provides a kind of storage medium, has the computer of program code that processor can perform
Read/write memory medium, said program code perform the processor:
The the first process creation shared drive and mutual exclusion lock of browser;
The filec descriptor of the shared drive and the mutual exclusion lock are sent to the browser by first process
At least one second process;
The second process of target in first process or at least one second process obtains the mutual exclusion lock and adds
The shared drive pointed by the filec descriptor is written in process daily record by lock;
Journal file is written in the process daily record in the shared drive by first process, to pass through the daily record
File is uploaded to server.
In conclusion multi-process browser process log collecting method provided by the embodiments of the present application, device and movement
The the first process creation shared drive and mutual exclusion lock of terminal, first browser, the first process is by the filec descriptor of shared drive
At least one second process of browser is sent to mutual exclusion lock, then the target in the first process or at least one second process
Second process obtains the mutual exclusion lock and locks, by process daily record be written filec descriptor pointed by shared drive, last first
Journal file is written in process daily record in shared drive by process, to be uploaded to server by the journal file, so as to pass through
The mode of one piece of shared drive is shared in mutual exclusion lock and multi-process, to solve multi-process browser process log collection difficulty and influence
The problem of browser normal operation.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight
Point explanation is all difference from other examples, and just to refer each other for identical similar part between each embodiment.
For device class embodiment, since it is basicly similar to embodiment of the method, so description is fairly simple, related part is joined
See the part explanation of embodiment of the method.For the described arbitrary processing mode in embodiment of the method, in device reality
It applies in example and no longer can be one by one repeated in device embodiment by corresponding processing modules implement.
Referring to Fig. 7, based on above-mentioned multi-process browser process log collecting method, device, the application is implemented
Example also provides a kind of mobile terminal 100, and including electronic body portion 10, the electronic body portion 10 includes housing 12 and is arranged on
Main display 120 on the housing 12.Metal can be used in the housing 12, such as steel, aluminium alloy are made.In the present embodiment,
The main display 120 generally includes display panel 111, may also comprise and carries out touch-control to the display panel 111 for responding
Circuit of operation etc..The display panel 111 can be liquid crystal display panel (Liquid Crystal Display,
LCD), in some embodiments, the display panel 111 is simultaneously a touch screen 109.
Please refer to Fig. 8, in practical application scenarios, the mobile terminal 100 can be used as intelligent mobile phone terminal into
It exercises and uses, the electronic body portion 10 also typically includes one or more (one is only shown in figure) processors in this case
102nd, memory 104, RF (Radio Frequency, radio frequency) module 106, voicefrequency circuit 110, sensor 114, input module
118th, power module 122.It will appreciated by the skilled person that structure shown in Fig. 8 is only to illustrate, not to described
The structure in electronic body portion 10 causes to limit.For example, the electronic body portion 10 may also include than shown in Fig. 8 more or more
Few component or with the configuration different from shown in Fig. 7.
It will appreciated by the skilled person that for the processor 102, every other component belongs to
It is coupled between peripheral hardware, the processor 102 and these peripheral hardwares by multiple Peripheral Interfaces 124.The Peripheral Interface 124 can
Based on following standard implementation:Universal Asynchronous Receive/sending device (Universal Asynchronous Receiver/
Transmitter, UART), universal input/output (General Purpose Input Output, GPIO), serial peripheral connect
Mouthful (Serial Peripheral Interface, SPI), internal integrated circuit (Inter-Integrated Circuit,
I2C), but it is not limited to above-mentioned standard.In some instances, the Peripheral Interface 124 can only include bus;In other examples
In, the Peripheral Interface 124 may also include other elements, such as one or more controller, such as connecting the display
The display controller of panel 111 or the storage control for connecting memory.In addition, these controllers can also be from described
Detached in Peripheral Interface 124, and be integrated in the processor 102 or corresponding peripheral hardware in.
The memory 104 can be used for storage software program and module, and the processor 102 is stored in institute by operation
The software program and module in memory 104 are stated, so as to perform various functions application and data processing.The memory
104 may include high speed random access memory, may also include nonvolatile memory, and such as one or more magnetic storage device dodges
It deposits or other non-volatile solid state memories.In some instances, the memory 104 can further comprise relative to institute
The remotely located memory of processor 102 is stated, these remote memories can pass through network connection to the electronic body portion 10
Or the main display 120.The example of above-mentioned network includes but not limited to internet, intranet, LAN, mobile communication
Net and combinations thereof.
The RF modules 106 are used to receive and transmit electromagnetic wave, realize the mutual conversion of electromagnetic wave and electric signal, so as to
It is communicated with communication network or other equipment.The RF modules 106 may include various existing for performing these functions
Circuit element, for example, antenna, RF transceiver, digital signal processor, encryption/deciphering chip, subscriber identity module
(SIM) card, memory etc..The RF modules 106 can be carried out with various networks such as internet, intranet, wireless network
Communication is communicated by wireless network and other equipment.Above-mentioned wireless network may include cellular telephone networks, wireless
LAN or Metropolitan Area Network (MAN).Above-mentioned wireless network can use various communication standards, agreement and technology, including but not limited to
Global system for mobile communications (Global System for Mobile Communication, GSM), enhanced mobile communication skill
Art (Enhanced Data GSM Environment, EDGE), Wideband CDMA Technology (wideband code
Division multiple access, W-CDMA), Code Division Multiple Access (Code division access, CDMA), time-division
Multiple access technology (time division multiple access, TDMA), adopting wireless fidelity technology (Wireless, Fidelity,
WiFi) (such as American Institute of Electrical and Electronics Engineers's standard IEEE 802.10A, IEEE 802.11b, IEEE802.11g and/
Or IEEE 802.11n), the networking telephone (Voice over internet protocal, VoIP), worldwide interoperability for microwave accesses
(Worldwide Interoperability for Microwave Access, Wi-Max), other for mail, Instant Messenger
The agreement of news and short message and any other suitable communications protocol or even it may include that those are not developed currently yet
Agreement.
Voicefrequency circuit 110, receiver 101, sound jack 103, microphone 105 provide user and the electronic body portion jointly
Audio interface between 10 or described main displays 120.Specifically, the voicefrequency circuit 110 receives at the processor 102
Voice data is converted to electric signal by voice data, by electric signal transmission to the receiver 101.The receiver 101 is by electric signal
Be converted to the sound wave that human ear can be heard.The voicefrequency circuit 110 receives electric signal also at the microphone 105, by electric signal
Voice data is converted to, and the processor 102 is given to be further processed data transmission in network telephony.Audio data can be with
It is obtained at the memory 104 or by the RF modules 106.In addition, audio data can also be stored to the storage
It is sent in device 104 or by the RF modules 106.
The sensor 114 is arranged in the electronic body portion 10 or in the main display 120, the sensor
114 example includes but is not limited to:Optical sensor, operation sensor, pressure sensor, gravity accelerometer and
Other sensors.
Specifically, the optical sensor may include light sensor 114F, pressure sensor 114G.Wherein, pressure sensing
Device 114G can detect the sensor of the pressure generated by being pressed on mobile terminal 100.That is, pressure sensor 114G detection by with
The pressure that contact between family and mobile terminal or pressing generate, for example, by the contact between the ear and mobile terminal of user or
Press the pressure generated.Therefore, whether pressure sensor 114G may be used to determine occurs between user and mobile terminal 100
Contact or the size of pressing and pressure.
Referring to Fig. 8, specifically in the embodiment shown in fig. 8, the light sensor 114F and the pressure
Sensor 114G is set adjacent to the display panel 111.The light sensor 114F can have object close to the main display
When shielding 120, such as when the electronic body portion 10 is moved in one's ear, the processor 102 closes display output.
As one kind of motion sensor, gravity accelerometer can detect in all directions (generally three axis) and accelerate
The size of degree can detect that size and the direction of gravity when static, can be used to identify the application of 100 posture of mobile terminal
(such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc..
In addition, the electronic body portion 10 can also configure the other sensors such as gyroscope, barometer, hygrometer, thermometer, herein no longer
It repeats,
In the present embodiment, the input module 118 may include the touch screen being arranged on the main display 120
109, the touch screen 109 collect user on it or neighbouring touch operation (for example user is any using finger, stylus etc.
Operation of the suitable object or attachment on the touch screen 109 or near the touch screen 109), and according to presetting
The corresponding attachment device of driven by program.Optionally, the touch screen 109 may include touch detecting apparatus and touch controller.
Wherein, the touch orientation of the touch detecting apparatus detection user, and the signal that touch operation is brought is detected, it transmits a signal to
The touch controller;The touch controller receives touch information from the touch detecting apparatus, and by the touch information
Contact coordinate is converted into, then gives the processor 102, and the order that the processor 102 is sent can be received and performed.
Furthermore, it is possible to realize touching for the touch screen 109 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves
Touch detection function.In addition to the touch screen 109, in other change embodiments, the input module 118 can also include it
His input equipment, such as button 107.The button 107 for example may include character keys for inputting character and for triggering
The control button of control function.The example of the control button includes " returning to main screen " button, on/off button etc..
The main display 120 is used to show by information input by user, is supplied to the information of user and the electronics
The various graphical user interface of body part 10, these graphical user interface can by figure, text, icon, number, video and its
Arbitrary to combine to form, in an example, the touch screen 109 may be disposed on the display panel 111 thus with described
Display panel 111 forms an entirety.
The power module 122 is used to provide supply of electric power to the processor 102 and other each components.Specifically,
The power module 122 may include power-supply management system, one or more power supply (such as battery or alternating current), charging circuit,
Power-fail detection circuit, inverter, indicator of the power supply status and any other and the electronic body portion 10 or the master
Generation, management and the relevant component of distribution of electric power in display screen 120.
The mobile terminal 100 further includes locator 119, and the locator 119 is used to determine 100 institute of mobile terminal
The physical location at place.In the present embodiment, the locator 119 realizes the positioning of the mobile terminal 100 using positioning service,
The positioning service, it should be understood that the location information of the mobile terminal 100 is obtained by specific location technology (as passed through
Latitude coordinate), it is marked on the electronic map by the technology of the position of positioning object or service.
It should be understood that above-mentioned mobile terminal 100 is not limited to intelligent mobile phone terminal, should refer to can move
The computer equipment used in dynamic.Specifically, mobile terminal 100, refer to be equipped with the mobile computer of intelligent operating system
Equipment, mobile terminal 100 include but not limited to smart mobile phone, smartwatch, tablet computer, etc..
In the description of this specification, reference term " one embodiment ", " example ", " is specifically shown " some embodiments "
The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description
Point is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It is combined in an appropriate manner in one or more embodiments or example.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the different embodiments or examples described in this specification and the feature of different embodiments or examples
It closes and combines.
In addition, term " first ", " second " are only used for description purpose, and it is not intended that instruction or hint relative importance
Or the implicit quantity for indicating indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present application, " multiple " are meant that at least two, such as two, three
It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include
Module, segment or the portion of the code of the executable instruction of one or more the step of being used to implement specific logical function or process
Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discuss suitable
Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, to perform function, this should be by the application
Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction
The system of row system, device or equipment instruction fetch and execute instruction) it uses or combines these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass
Defeated program is for instruction execution system, device or equipment or the dress used with reference to these instruction execution systems, device or equipment
It puts.The more specific example (non-exhaustive list) of computer-readable medium is including following:Electricity with one or more wiring
Connecting portion (mobile terminal), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable
Medium, because can be for example by carrying out optical scanner to paper or other media, then into edlin, interpretation or when necessary with it
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the application can be realized with hardware, software, firmware or combination thereof.Above-mentioned
In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage
Or firmware is realized.If for example, with hardware come realize in another embodiment, can be under well known in the art
Any one of row technology or their combination are realized:With for the logic gates to data-signal realization logic function
Discrete logic, have suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that realize all or part of step that above-described embodiment method carries
Suddenly it is that relevant hardware can be instructed to complete by program, the program can be stored in a kind of computer-readable storage medium
In matter, the program when being executed, one or a combination set of the step of including embodiment of the method.In addition, in each embodiment of the application
In each functional unit can be integrated in a processing module or each unit is individually physically present, can also two
A or more than two units are integrated in a module.The form that hardware had both may be used in above-mentioned integrated module is realized, also may be used
It is realized in the form of using software function module.If the integrated module realized in the form of software function module and as
Independent product is sold or in use, can also be stored in a computer read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although it has been shown and retouches above
Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limit to the application
System, those of ordinary skill in the art can be changed above-described embodiment, change, replace and become within the scope of application
Type.
Finally it should be noted that:Above example is only to illustrate the technical solution of the application, rather than its limitations;Although
The application is described in detail with reference to the foregoing embodiments, those of ordinary skill in the art are when understanding:It still can be with
It modifies to the technical solution recorded in foregoing embodiments or equivalent replacement is carried out to which part technical characteristic;And
These modification or replace, do not drive corresponding technical solution essence be detached from each embodiment technical solution of the application spirit and
Range.
Claims (10)
1. a kind of multi-process browser process log collecting method, which is characterized in that the method includes:
The the first process creation shared drive and mutual exclusion lock of browser;
The filec descriptor of the shared drive and the mutual exclusion lock are sent to the browser at least by first process
One the second process;
The second process of target in first process or at least one second process obtains the mutual exclusion lock and locks, will
The shared drive pointed by the filec descriptor is written in process daily record;
Journal file is written in the process daily record in the shared drive by first process, to pass through the journal file
It is uploaded to server.
2. according to the method described in claim 1, it is characterized in that, in first process or at least one second process
The second process of target obtain the mutual exclusion lock and lock, process daily record is written described common pointed by the filec descriptor
Memory is enjoyed, including:
First process or the second process of the target obtain the mutual exclusion lock and lock;
It is full to judge whether the shared drive has been write;
If the shared drive has write full, the annular covering shared drive write-in process daily record.
3. according to the method described in claim 1, it is characterized in that, in first process or at least one second process
The second process of target obtain the mutual exclusion lock and lock, process daily record is written described common pointed by the filec descriptor
Memory is enjoyed, including:
First process obtains the mutual exclusion lock and locks, and the first process daily record is written the shared drive;
First process discharges the mutual exclusion lock after the write-in for completing the first process daily record;
Second process of target obtains the mutual exclusion lock and locks, and the second process daily record is written the shared drive;
Second process of target discharges the mutual exclusion lock after the write-in for completing the second process daily record.
It 4., will according to the method described in claim 3, it is characterized in that, first process obtains the mutual exclusion lock and locks
The shared drive is written in first process daily record, including:
First process opens first thread;
The first thread obtains the mutual exclusion lock and locks, and the first process daily record is written the shared drive.
5. method according to claim 3 or 4, which is characterized in that second process of target obtains the mutual exclusion lock simultaneously
It locks, the shared drive is written into the second process daily record, including:
Second process of target opens the second thread;
Second thread obtains the mutual exclusion lock and retrieves, and the second process daily record is written the shared drive.
6. according to the method described in claim 1, it is characterized in that, first process describes the file of the shared drive
Symbol and the mutual exclusion lock are sent at least one second process of the browser, including:
The filec descriptor of the shared drive and the mutual exclusion lock are sent to described at least one by first process by ipc
A second process.
7. according to the method described in claim 1, it is characterized in that, first process is Browser processes.
8. a kind of multi-process browser process log collection device, which is characterized in that described device includes:
Creation module, for the first process creation shared drive and mutual exclusion lock of browser;
The filec descriptor of the shared drive and the mutual exclusion lock are sent to described by sending module for first process
At least one second process of browser;
Process daily record writing module obtains for the second process of target in first process or at least one second process
It takes the mutual exclusion lock and locks, the shared drive pointed by the filec descriptor is written into process daily record;
For first process journal file is written in the process daily record in the shared drive by file writing module,
To be uploaded to server by the journal file.
9. a kind of mobile terminal, which is characterized in that including display, memory and processor, the display and described deposit
Reservoir is couple to the processor, the memory store instruction, the when executed by the processor processing
Device performs such as claim 1-7 any one of them methods.
A kind of 10. computer read/write memory medium of program code that can perform with processor, which is characterized in that the journey
Sequence code makes the processor perform such as claim 1-7 any one of them methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711496256.6A CN108255674A (en) | 2017-12-31 | 2017-12-31 | multi-process browser process log collecting method, device and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711496256.6A CN108255674A (en) | 2017-12-31 | 2017-12-31 | multi-process browser process log collecting method, device and mobile terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108255674A true CN108255674A (en) | 2018-07-06 |
Family
ID=62724639
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711496256.6A Pending CN108255674A (en) | 2017-12-31 | 2017-12-31 | multi-process browser process log collecting method, device and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108255674A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109347899A (en) * | 2018-08-22 | 2019-02-15 | 北京百度网讯科技有限公司 | The method of daily record data is written in distributed memory system |
CN110096440A (en) * | 2019-04-26 | 2019-08-06 | 厦门网宿有限公司 | A kind of log processing method and device |
CN110765085A (en) * | 2019-10-12 | 2020-02-07 | 捷开通讯(深圳)有限公司 | Log information writing method, system, storage medium and mobile terminal |
CN111078523A (en) * | 2019-12-25 | 2020-04-28 | 惠州Tcl移动通信有限公司 | Log obtaining method and device, storage medium and electronic equipment |
CN111930686A (en) * | 2020-07-15 | 2020-11-13 | 杭州海康威视***技术有限公司 | Method and device for storing log and computer equipment |
CN112749023A (en) * | 2019-10-30 | 2021-05-04 | 阿里巴巴集团控股有限公司 | Information processing method, device, equipment and system |
CN116701320A (en) * | 2022-12-01 | 2023-09-05 | 荣耀终端有限公司 | Log generation method and related device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1567248A (en) * | 2003-07-01 | 2005-01-19 | 华为技术有限公司 | Log recording method and system for application program |
CN102508765A (en) * | 2011-11-17 | 2012-06-20 | 深圳市中兴移动通信有限公司 | Method for monitoring software log in real time by inter-process communication |
CN103049245A (en) * | 2012-10-25 | 2013-04-17 | 浪潮电子信息产业股份有限公司 | Software performance optimization method based on central processing unit (CPU) multi-core platform |
CN106980551A (en) * | 2017-03-24 | 2017-07-25 | 山东浪潮商用***有限公司 | A kind of Way of Process Communication and device |
-
2017
- 2017-12-31 CN CN201711496256.6A patent/CN108255674A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1567248A (en) * | 2003-07-01 | 2005-01-19 | 华为技术有限公司 | Log recording method and system for application program |
CN102508765A (en) * | 2011-11-17 | 2012-06-20 | 深圳市中兴移动通信有限公司 | Method for monitoring software log in real time by inter-process communication |
CN103049245A (en) * | 2012-10-25 | 2013-04-17 | 浪潮电子信息产业股份有限公司 | Software performance optimization method based on central processing unit (CPU) multi-core platform |
CN106980551A (en) * | 2017-03-24 | 2017-07-25 | 山东浪潮商用***有限公司 | A kind of Way of Process Communication and device |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109347899A (en) * | 2018-08-22 | 2019-02-15 | 北京百度网讯科技有限公司 | The method of daily record data is written in distributed memory system |
CN110096440A (en) * | 2019-04-26 | 2019-08-06 | 厦门网宿有限公司 | A kind of log processing method and device |
CN110765085A (en) * | 2019-10-12 | 2020-02-07 | 捷开通讯(深圳)有限公司 | Log information writing method, system, storage medium and mobile terminal |
CN112749023A (en) * | 2019-10-30 | 2021-05-04 | 阿里巴巴集团控股有限公司 | Information processing method, device, equipment and system |
CN112749023B (en) * | 2019-10-30 | 2024-06-11 | 阿里巴巴集团控股有限公司 | Information processing method, device, equipment and system |
CN111078523A (en) * | 2019-12-25 | 2020-04-28 | 惠州Tcl移动通信有限公司 | Log obtaining method and device, storage medium and electronic equipment |
CN111078523B (en) * | 2019-12-25 | 2024-02-09 | 惠州Tcl移动通信有限公司 | Log acquisition method and device, storage medium and electronic equipment |
CN111930686A (en) * | 2020-07-15 | 2020-11-13 | 杭州海康威视***技术有限公司 | Method and device for storing log and computer equipment |
CN111930686B (en) * | 2020-07-15 | 2024-02-20 | 杭州海康威视***技术有限公司 | Method and device for storing logs and computer equipment |
CN116701320A (en) * | 2022-12-01 | 2023-09-05 | 荣耀终端有限公司 | Log generation method and related device |
CN116701320B (en) * | 2022-12-01 | 2024-05-14 | 荣耀终端有限公司 | Log generation method and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108255674A (en) | multi-process browser process log collecting method, device and mobile terminal | |
CN108769514A (en) | Camera control method, device, electronic device and storage medium | |
CN108762859A (en) | Wallpaper displaying method, device, mobile terminal and storage medium | |
CN108664475A (en) | Translate display methods, device, mobile terminal and storage medium | |
CN108710456A (en) | Application icon processing method, device and mobile terminal | |
CN108717343A (en) | Application icon processing method, device and mobile terminal | |
CN108228025A (en) | message display method, device, mobile terminal and storage medium | |
CN108228358A (en) | Correct method, apparatus, mobile terminal and the storage medium of vertical synchronizing signal | |
CN108446211A (en) | Browser exception collection method, device, mobile terminal and storage medium | |
CN108777731A (en) | Key configurations method, apparatus, mobile terminal and storage medium | |
CN110244884B (en) | Desktop icon management method and terminal equipment | |
CN108804005A (en) | terminal control method, device and mobile terminal | |
CN108388671A (en) | Information sharing method, device, mobile terminal and computer-readable medium | |
CN108646959A (en) | Screen control method, device and mobile terminal | |
CN108762466A (en) | Display methods, device, mobile terminal and storage medium | |
CN108536504A (en) | page display method, device, mobile terminal and storage medium | |
CN108512997A (en) | Display methods, device, mobile terminal and storage medium | |
CN108646994A (en) | Information processing method, device, mobile terminal and storage medium | |
CN107766548A (en) | Method for information display, device, mobile terminal and readable storage medium storing program for executing | |
CN108390992A (en) | Message display method, device, mobile terminal and storage medium | |
CN109104521A (en) | Bearing calibration, device, mobile terminal and the storage medium of proximity state | |
CN108366163A (en) | Control method, device, mobile terminal and the computer-readable medium of camera applications | |
CN110147186A (en) | A kind of control method and terminal device of application | |
CN108881979A (en) | Information processing method, device, mobile terminal and storage medium | |
CN110221882A (en) | Display methods, device, mobile terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180706 |
|
RJ01 | Rejection of invention patent application after publication |