CN106598858B - Resource transfer analysis method and device - Google Patents

Resource transfer analysis method and device Download PDF

Info

Publication number
CN106598858B
CN106598858B CN201611154713.9A CN201611154713A CN106598858B CN 106598858 B CN106598858 B CN 106598858B CN 201611154713 A CN201611154713 A CN 201611154713A CN 106598858 B CN106598858 B CN 106598858B
Authority
CN
China
Prior art keywords
call operation
case
resource
recalls information
memory space
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.)
Active
Application number
CN201611154713.9A
Other languages
Chinese (zh)
Other versions
CN106598858A (en
Inventor
潘世光
王乾鹏
吴建平
李庆燕
彭伟刚
林岳
顾思斌
潘柏宇
王冀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Youku Network Technology Beijing Co Ltd
Original Assignee
Unified Network Technology (beijing) Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Unified Network Technology (beijing) Co Ltd filed Critical Unified Network Technology (beijing) Co Ltd
Priority to CN201611154713.9A priority Critical patent/CN106598858B/en
Publication of CN106598858A publication Critical patent/CN106598858A/en
Application granted granted Critical
Publication of CN106598858B publication Critical patent/CN106598858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The present invention relates to a kind of resource transfer analysis method and devices, which comprises obtains the call operation for being directed to resource;In the case where getting the call operation, judge whether the call operation meets analysis condition;In the case where the call operation meets analysis condition, analyzes and record recalls information corresponding with the call operation;In the case where meeting information output condition, recorded recalls information is exported.The call operation for resource can be obtained in accordance with an embodiment of the present disclosure, recalls information corresponding with the call operation for meeting analysis condition is analyzed and record, and export recorded recalls information, thus the efficiently and accurately calling situation of analysis system resource.

Description

Resource transfer analysis method and device
Technical field
The present invention relates to field of computer technology more particularly to a kind of resource transfer analysis method and devices.
Background technique
With the continuous development of terminal device (such as smart phone etc.), need to occur in the system to terminal device each Kind problem is analyzed and is handled.The analysis of system problem (such as memory overflow etc.) is generally used manually in the related technology The modes such as code inspection and the examination of third party's tool.The examination efficiency of artificial code inspection is lower, and the examination pair of third party's tool It is poor in the compatibility of some systems (such as Android android system), the problems such as that there are loading velocities is slow, inefficiency.
Such as when for Android system progress Memory leakage detection, in common third party's tool, tool valgrind (the Memory leakage detection tool under linux platform) is applied to after android system, and App (application program) loading velocity is special It is not slow, and since control of the Android operation system to process is different from Linux, the examining report of valgrind is not easy Control, and there are the leakages of more wrong report;The memory analysis that tool LeakTrace needs that it is called to provide manually in code API (application programming interface), need recompilate, be packaged, deployment after could use, use it is very troublesome, and And there are ABI (application binaries interface) compatibling problems.
Summary of the invention
In view of this, the present disclosure proposes a kind of resource transfer analysis method and devices, so as to rapidly and accurately to system The calling situation of resource is analyzed.
According to the one side of the disclosure, a kind of resource transfer analysis method is provided, which comprises obtain for money The call operation in source;In the case where getting the call operation, judge whether the call operation meets analysis condition;? In the case that the call operation meets analysis condition, analyzes and record recalls information corresponding with the call operation;? In the case where meeting information output condition, recorded recalls information is exported.
For the above method, in one possible implementation, the method also includes: it deposits in the first memory space Thread identification corresponding with the call operation obtained is stored up, and with the first label to corresponding with the call operation currently carried out Thread identification be marked.
For the above method, in one possible implementation, in the case where getting the call operation, judgement Whether the call operation meets analysis condition, comprising: the tune for whether having and currently obtaining in inquiry first memory space With operate it is corresponding, labeled as it is described first label thread identification;In first memory space not with currently obtain In the case where the thread identification that the call operation taken is corresponding, marks labeled as described first, judge that the call operation is full Sufficient analysis condition.
For the above method, in one possible implementation, the case where the call operation meets analysis condition Under, it analyzes and records recalls information corresponding with the call operation, comprising: be the tune of application resource in the call operation In the case where, recalls information corresponding with the call operation is stored in the second memory space;In the call operation In the case where being the calling for discharging resource, calling letter corresponding with the call operation is deleted from second memory space Breath.
For the above method, in one possible implementation, in the case where meeting information output condition, institute is exported The recalls information of record, comprising: monitor whether that there are recalls information output orders;There are recalls information output order the case where Under, it is judged as and meets information output condition;In the case where meeting information output condition, read from second memory space And export stored recalls information.
For the above method, in one possible implementation, the call operation for being directed to resource is obtained, comprising: kidnap For the call operation of application programming interface API.
According to another aspect of the present disclosure, a kind of resource transfer analytical equipment is provided, described device includes:
Module is obtained, for obtaining the call operation for being directed to resource;
Judgment module, in the case where getting the call operation, judging whether the call operation meets point Analysis condition;
Analyze logging modle, in the case where the call operation meets analysis condition, analyze and record with it is described The corresponding recalls information of call operation;
Output module, for exporting recorded recalls information in the case where meeting information output condition.
For above-mentioned apparatus, in one possible implementation, described device further include:
Memory module is identified, for storing thread mark corresponding with the call operation obtained in the first memory space Know, and thread identification corresponding with the call operation currently carried out is marked with the first label.
For above-mentioned apparatus, in one possible implementation, the judgment module includes:
Mark inquiry submodule, for inquiring in first memory space call operation phase for whether having and currently obtaining Thread identification corresponding, labeled as first label;
First judging submodule, it is corresponding with the call operation currently obtained for not having in first memory space , labeled as it is described first label thread identification in the case where, judge that the call operation meets analysis condition.
For above-mentioned apparatus, in one possible implementation, the analysis logging modle includes:
First analysis submodule, for being stored second in the case where the call operation is to apply for the calling of resource Recalls information corresponding with the call operation is stored in space;
Second analysis submodule, for the call operation be discharge resource calling in the case where, from described second Recalls information corresponding with the call operation is deleted in memory space.
For above-mentioned apparatus, in one possible implementation, the output module includes:
Command monitoring submodule, for monitoring whether that there are recalls information output orders;
Second judgment submodule meets information output for being judged as there are recalls information output order Condition;
First output sub-module, for being read from second memory space in the case where meeting information output condition It takes and exports stored recalls information.
For above-mentioned apparatus, in one possible implementation, the acquisition module includes:
Submodule is kidnapped, for kidnapping the call operation for being directed to application programming interface API.
According to another aspect of the present disclosure, a kind of resource transfer analytical equipment is provided, described device includes:
Processor;Memory for storage processor executable instruction;
Wherein, the processor is configured to: obtain be directed to resource call operation;Getting the call operation In the case of, judge whether the call operation meets analysis condition;In the case where the call operation meets analysis condition, point It analyses and records recalls information corresponding with the call operation;In the case where meeting information output condition, output is recorded Recalls information.
According to another aspect of the present disclosure, a kind of non-volatile computer readable storage medium storing program for executing is provided, when the storage When instruction in medium is executed by the processor of terminal and/or server, so that terminal and/or server are able to carry out a kind of money Call analysis method in source, which comprises obtain the call operation for being directed to resource;The case where getting the call operation Under, judge whether the call operation meets analysis condition;In the case where the call operation meets analysis condition, analysis is simultaneously Record recalls information corresponding with the call operation;In the case where meeting information output condition, recorded tune is exported Use information.
According to the resource transfer analysis method and device of the embodiment of the present disclosure, the call operation for resource can be obtained, Recalls information corresponding with the call operation for meeting analysis condition is analyzed and recorded, and exports recorded recalls information, from And the efficiently and accurately calling situation of analysis system resource.
According to below with reference to the accompanying drawings to detailed description of illustrative embodiments, the other feature and aspect of the disclosure will become It is clear.
Detailed description of the invention
Comprising in the description and constitute the attached drawing of part of specification and specification together illustrate it is of the invention Exemplary embodiment, feature and aspect, and principle for explaining the present invention.
Fig. 1 is a kind of flow chart of resource transfer analysis method shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of resource transfer analysis method shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of resource transfer analysis method shown according to an exemplary embodiment.
Fig. 4 is a kind of flow chart of resource transfer analysis method shown according to an exemplary embodiment.
Fig. 5 is a kind of flow chart of the step 13 of resource transfer analysis method shown according to an exemplary embodiment.
Fig. 6 is a kind of flow chart of the step 14 of resource transfer analysis method shown according to an exemplary embodiment.
Fig. 7 is a kind of block diagram of resource transfer analytical equipment shown according to an exemplary embodiment.
Fig. 8 is a kind of block diagram of resource transfer analytical equipment shown according to an exemplary embodiment.
Fig. 9 is a kind of block diagram of resource transfer analytical equipment shown according to an exemplary embodiment.
Figure 10 is a kind of block diagram of resource transfer analytical equipment shown according to an exemplary embodiment.
Specific embodiment
Various exemplary embodiments, feature and the aspect of the disclosure are described in detail below with reference to attached drawing.It is identical in attached drawing Appended drawing reference indicate element functionally identical or similar.Although the various aspects of embodiment are shown in the attached drawings, remove It non-specifically points out, it is not necessary to attached drawing drawn to scale.
Dedicated word " exemplary " means " being used as example, embodiment or illustrative " herein.Here as " exemplary " Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
In addition, giving numerous details in specific embodiment below to better illustrate the disclosure. It will be appreciated by those skilled in the art that without certain details, the disclosure equally be can be implemented.In some instances, for Method, means, element and circuit well known to those skilled in the art are not described in detail, in order to highlight the purport of the disclosure.
Embodiment 1
Fig. 1 is a kind of flow chart of resource transfer analysis method shown according to an exemplary embodiment.This method can answer For in terminal device (such as smart phone) or server.As shown in Figure 1, being analyzed according to the resource transfer of the embodiment of the present disclosure Method includes:
Step S11 obtains the call operation for being directed to resource;
Step S12 judges whether the call operation meets analysis item in the case where getting the call operation Part;
Step S13 is analyzed and is recorded and the call operation phase in the case where the call operation meets analysis condition Corresponding recalls information;
Step S14 exports recorded recalls information in the case where meeting information output condition.
The call operation for resource can be obtained in accordance with an embodiment of the present disclosure, analyze and record and meet analysis condition The corresponding recalls information of call operation, and recorded recalls information is exported, thus efficiently and accurately analysis system resource Calling situation.
For example, in the operating system of terminal device, application program App needs calling system resource (example when running Such as memory headroom), such as application system resource is needed when starting operation, terminate to need free system resources when operation, these mistakes The application programming interface API in calling system library is needed in journey.It is available for resource in the resource transfer analysis Call operation, such as in Android system, Android local layer identification code (Android can be kidnapped by way of symbol abduction Native code) to the library libc provide API call operation, to obtain the call operation.Tool of the disclosure to call operation Body acquisition modes are with no restrictions.
In one possible implementation, when getting call operation, it is understood that there may be acquired call operation is not The case where being call operation to be analyzed, for example, self kidnapping for often will appear in symbol abduction mode (has kidnapped symbol misfortune Hold the resource transfer operation of operation itself), so as to cause the result inaccuracy of resource transfer analysis.Thus, in order to avoid this Situation occurs, it can be determined that whether acquired call operation meets analysis condition.If being unsatisfactory for analysis condition, do not analyze The call operation continues to obtain;If meeting analysis condition, the call operation is analyzed, and will be corresponding with the call operation Recalls information be recorded in the memory headroom of system, such as record in a manner of mapping call stack in recalls information, resource Descriptor etc..
In one possible implementation, if meeting information output condition, such as reach preset actual conditions (app end of run etc.) or user have input information output order, then export recorded recalls information.It can be for example from upper Recorded recalls information is obtained in the system memory space stated, and readable file such as journal file is converted into, for user It checks and/or is further processed.
Fig. 2 is a kind of flow chart of resource transfer analysis method shown according to an exemplary embodiment.As shown in Fig. 2, In one possible implementation, step S11 includes:
Step S111 kidnaps the call operation for being directed to application programming interface API.
For example, local layer identification code apply or discharge resource when can calling system library provide API, can using with Third party's tool valgrind similar mode kidnaps the API that local layer identification code provides system library by way of symbol abduction Call operation, to obtain the call operation.For example, can establish the independent library so in Android system Libleaktest.so does not do any change to the source code of tested App.It is preferential to load in app starting to be tested To memory, the symbol that LD_PRELOAD type can be used kidnaps mode and kidnaps Android local layer identification code in the library libleaktest.so To the call operation for the API that the library libc provides.Also other kinds of symbol abduction mode can be used and kidnap call operation, this public affairs It opens to this with no restriction.
In this way, can be in the case where not changing the source code of tested App, the calling kidnapped for API is grasped Make, improves the acquisition efficiency of call operation.
Fig. 3 is a kind of flow chart of resource transfer analysis method shown according to an exemplary embodiment.As shown in figure 3, In one possible implementation, the method also includes:
Step 15, corresponding with the call operation obtained thread identification is stored, and in the first memory space with the Thread identification corresponding with the call operation currently carried out is marked in one label.
For example, the first memory space, first memory space can be created when the library libleaktest.so starts It can be static bitmap (bitmap), be also possible to the memory space of other storage forms.It, can when obtaining call operation every time It is stored in first memory space with the thread identification (such as Thread Id) of the corresponding thread of the call operation that will acquire, and The thread is marked, such as labeled as 1 (the first label).For example, position can be used when first memory space includes bitmap The value of each in figure indicates whether the corresponding thread of thread identification is doing the operation of corresponding API Calls, and ongoing The corresponding thread of call operation can be expressed as 1 in bitmap, and the thread for not being called operation currently can be in bitmap It is expressed as 0 (the second label).Correspondingly, at the end of the call operation currently carried out, can identify respective thread first is marked Note is changed to the second label, such as becomes 0 by 1.
In this way, the thread for being called operation can be marked, avoid the occurrence of repetition obtain or Obtain the case where omitting.
Fig. 4 is a kind of flow chart of resource transfer analysis method shown according to an exemplary embodiment.As shown in figure 4, In one possible implementation, step 12 includes:
Step 121, whether inquire in first memory space has, label corresponding with the call operation currently obtained For the thread identification of the first label;
Step 122, do not have in first memory space it is corresponding with the call operation currently obtained, labeled as institute In the case where the thread identification for stating the first label, judge that the call operation meets analysis condition.
For example, when getting call operation, it is understood that there may be acquired call operation is not calling to be analyzed The case where operation, for example, self kidnapping for often will appear in symbol abduction mode (has kidnapped the money that symbol kidnaps operation itself Source call operation), so as to cause the result inaccuracy of resource transfer analysis.Therefore, it is possible to judge whether the call operation is full Sufficient analysis condition.
In order to avoid repeating to obtain (such as self kidnapping), the relevant technologies generally use the call operation addition mark to acquisition The mode of will is no longer kidnapped if flag bit is true after coming in next time for example, mark is set to true after kidnapping.But the party Case, which will lead to, misses some calling that should be kidnapped, for example asynchronous the entering of multiple threads is kidnapped, if a thread is mark Will is set to true, then the calling that should be kidnapped of other threads will not be held as a hostage, and causes to obtain and omit.
In one possible implementation, as previously mentioned, storage can be created when the library libleaktest.so starts There is the first memory space of thread identification corresponding with the call operation obtained, and to the thread for being called operation It is marked with the first label (such as 1).When getting call operation and for example kidnapping to correlation API, inquiry the first storage sky Between in whether have it is corresponding with the call operation currently obtained and labeled as first label thread identification ID, for example, bitmap In the corresponding position of the thread identification value be 1, if so, then illustrate the call operation currently obtained for repeat obtain, the tune Leaktest.so itself is come from operation, it should directly be let pass, without analysis;If without the call operation currently obtained Thread Id corresponding, labeled as the first label, then illustrate the call operation currently obtained from local layer identification code (native code), meets analysis condition, is analyzed.If should there is no what is currently obtained in the first memory space The corresponding thread identification ID of call operation, then be considered as and be unsatisfactory for analysis condition, and thread identification ID can be added to first In memory space and it is labeled as first identifier, the calling in the subsequent library leaktest.so itself is prevented also to be held as a hostage.Meet analysis When condition, the call operation currently obtained can be analyzed and be recorded, it, can be by the tune after completing analysis and record The second label is changed to by the first label with corresponding thread identification is operated, such as becomes 0 from 1.
In this way, it can be omitted to avoid repeating to obtain or obtain, improve the accurate of the calling analysis of system resource Property.
Fig. 5 is a kind of flow chart of the step 13 of resource transfer analysis method shown according to an exemplary embodiment.Such as Shown in Fig. 5, in one possible implementation, step 13 includes:
Step S131 is stored in the second memory space in the case where the call operation is to apply for the calling of resource Recalls information corresponding with the call operation;
Step S133, in the case where the call operation is to discharge the calling of resource, from second memory space Delete recalls information corresponding with the call operation.
For example, when call operation meets analysis condition, it can analyze the type of the call operation and handled. If the call operation is to apply for the calling (such as malloc, socket in the API of Android system etc.) of the API of resource, The corresponding recalls information of the call operation can be saved in the second memory space.The recalls information may include the tune With the corresponding Thread Id of the API of operation, call stack, resource descriptor etc.;Second memory space can be resource descriptor For keyword (pointer address), call stack is the Hash mapping (map) for being worth (content).
In one possible implementation, if the call operation is API Calls (such as the Android system for discharging resource API in free, close etc.), then can be searched in the second memory space and delete calling corresponding with call operation Information, for example, search corresponding with call operation resource descriptor, and by the key-value pair found (keyword and value) from mapping Middle deletion.
In one possible implementation, it should be noted that above-mentioned analysis record operation can be independent It is carried out in such as libleaktest.so of library, does not need to do the source code of tested App any change.In such as Android system In API, obtain (symbol abduction) to call operation relate generally to malloc, calloc, free, fopen, fclose, The libraries such as socket, eventpoll, close, pthread_create, pthread_detach, pthread_join.
In this way, the calling of application resource can be stored in the second memory space and deletes the tune of release resource With, efficiently and accurately record system resource calling situation.
Fig. 6 is a kind of flow chart of the step 14 of resource transfer analysis method shown according to an exemplary embodiment.Such as Shown in Fig. 6, in one possible implementation, step 14 includes:
Step 141, monitor whether that there are recalls information output orders;
Step 142, there are recalls information output order, it is judged as and meets information output condition;
Step 143, it in the case where meeting information output condition, reads and exports from second memory space and deposited The recalls information of storage.
For example, in the case where having recorded recalls information, recorded recalls information can be exported.But some In system, recorded recalls information can not be exported in real time in a manner readable, such as in Android system, Android The API for obtaining call stack, including unwind_backtrace and get_backtrace_ are provided in the library libcorkscrew symbols.The wherein pointer address of the available current call stack of unwind_bakctrace, get_backtrace_ Symbols passes through the mapping map file of acquisition process and maps pointer address, is converted into readable call stack. But found during actual use, get_backtrace_symbols executes very slowly, if robbed every time All call get_backtrace_symbols that can seriously affect the App speed of service after holding.Therefore, it is possible in the second memory space It is middle to store recalls information corresponding with the call operation, by the way of Delay Mapping (backtrace), that is, needing Pointer address (such as keyword) is mapped to readable text again when exporting analysis log.
In one possible implementation, can start automatically at load (such as load library libleaktest.so) Listening thread monitors the order line terminal (such as terminal module of smart phone) of terminal device with the presence or absence of recalls information Output order, wherein the recalls information output order can be expressed as "/sdcard/LeakTest/dr ".The listening thread can It whether there is with continuing to monitor such as "/sdcard/LeakTest/dr " file, if there is no this document, then can continue to supervise It surveys;If there is this document, then may determine that meet information output condition.
It in one possible implementation, can be from second storage in the case where meeting information output condition It is read in space and exports stored recalls information.It, can be by calling journal output module will such as in Android system Testing result (recalls information stored) in second memory space (mapping) is output to log logcat, and user can pass through Filter the testing result that LeakTest keyword captures memory overflow from logcat buffering.It can also be using other modes by the The recalls information that two memory spaces are stored is read and exports as readable text, and the disclosure is not limited this.
In one possible implementation, when carrying out resource transfer analysis to Android system, since Android is special Process flowchart mechanism, the analysis of local (Native) global data, which reaches function, when exiting App to be called, this leads to not Realization exports examining report when App is exited automatically, this is also that current valgrind tool cannot be efficiently applied to Android The major reason of operation.And the process of memory leak detecting sometimes itself need not and exit app, only detect one or For multiple scenes either with or without RAM leakage, this requires us can control output test result at any time.Therefore, using the defeated of the disclosure Mode out, the control that log exports can be converted to user it is right/control of sdcard/LeakTest/dr file, when user runs Complete test analysis step, as long as by executing touch/sdcard/LeakTest/dr in terminal when wanting to check testing result The output of result, the control of very convenient user can be realized.
Following present a kind of possible application scenarios of the resource transfer analysis method of the disclosure.For Android local layer Code (Android native code), can establish the independent library so libleaktest.so.It is treated in Android terminal App is surveyed to be configured, such as: setprop wrap.packet.name " LD_PRELOAD=/path/to/ leaktest.so".Then, start App to be tested to be tested.It is preferential to load in App to be tested starting Mode is kidnapped using the symbol of LD_PRELOAD type and kidnaps Android local layer identification code pair to memory in the library libleaktest.so The call operation for the API that the library libc provides, being stored as resource descriptor is keyword, and call stack is the Hash mapping (map) of value. When needing to export result, touch/sdcard/LeakTest/dr order is executed in Android terminal.Then, pass through Logcat obtains log: logcat | grep LeakTest.
In this way, stored recalls information can be exported when meeting information output condition, improve output Convenience and accuracy.
According to the resource transfer analysis method of the disclosure can the calling situation rapidly and accurately to system resource divide Analysis, and do not need to do any change to detected source code;Compared with existing memory testing tool, when significantly reducing load Between, runing time and rate of false alarm;The memory overflow of Android operation system Native code can easily be analyzed, thread is let out The problems such as dew, has ensured the product quality of android system.
Embodiment 2
Fig. 7 is a kind of block diagram of resource transfer analytical equipment shown according to an exemplary embodiment.As shown in fig. 7, should Resource transfer analytical equipment includes: that behavior obtains module 71, judgment module 72, analysis logging modle 73 and output module 74.
Module 71 is obtained, for obtaining the call operation for being directed to resource;
Judgment module 72, in the case where getting the call operation, judging whether the call operation meets Analysis condition;
Logging modle 73 is analyzed, in the case where the call operation meets analysis condition, analyzing and recording and institute State the corresponding recalls information of call operation;
Output module 74, for exporting recorded recalls information in the case where meeting information output condition.
Fig. 8 is a kind of block diagram of resource transfer analytical equipment shown according to an exemplary embodiment.As shown in figure 8, In a kind of possible implementation, described device further include:
Memory module 75 is identified, for storing thread corresponding with the call operation obtained in the first memory space Mark, and thread identification corresponding with the call operation currently carried out is marked with the first label.
As shown in figure 8, in one possible implementation, the judgment module 72 includes:
Whether mark inquiry submodule 721 is grasped for inquiring in first memory space to have with the calling currently obtained Make thread identification corresponding, labeled as first label;
First judging submodule 722, the call operation phase for not having in first memory space with currently obtaining It is corresponding, labeled as it is described first label thread identification in the case where, judge that the call operation meets analysis condition.
As shown in figure 8, in one possible implementation, the analysis logging modle 73 includes:
First analysis submodule 731, for being deposited second in the case where the call operation is to apply for the calling of resource Store up storage recalls information corresponding with the call operation in space;
Second analysis submodule 732, in the case where the call operation is to discharge the calling of resource, from described the Recalls information corresponding with the call operation is deleted in two memory spaces.
As shown in figure 8, in one possible implementation, the output module 74 includes:
Command monitoring submodule 741, for monitoring whether that there are recalls information output orders;
Second judgment submodule 742, for there are recalls information output order, being judged as that meet information defeated Condition out;
First output sub-module 743, in the case where meeting information output condition, from second memory space It reads and exports stored recalls information.
As shown in figure 8, in one possible implementation, the acquisition module 71 includes:
Submodule 711 is kidnapped, for kidnapping the call operation for being directed to application programming interface API.
The call operation for resource can be obtained in accordance with an embodiment of the present disclosure, analyze and record and meet analysis condition The corresponding recalls information of call operation, and recorded recalls information is exported, thus efficiently and accurately analysis system resource Calling situation.
Embodiment 3
Fig. 9 is a kind of block diagram of resource transfer analytical equipment 800 shown according to an exemplary embodiment.For example, device 800 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, and medical treatment is set It is standby, body-building equipment, personal digital assistant etc..
Referring to Fig. 9, device 800 may include following one or more components: processing component 802, memory 804, power supply Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and Communication component 816.
The integrated operation of the usual control device 800 of processing component 802, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 802 may include that one or more processors 820 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in device 800.These data are shown Example includes the instruction of any application or method for operating on device 800, contact data, and telephone book data disappears Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 may include power management system System, one or more power supplys and other with for device 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between described device 800 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 808 includes a front camera and/or rear camera.When device 800 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set Part 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented Estimate.For example, sensor module 814 can detecte the state that opens/closes of device 800, and the relative positioning of component, for example, it is described Component is the display and keypad of device 800, and sensor module 814 can be with 800 1 components of detection device 800 or device Position change, the existence or non-existence that user contacts with device 800,800 orientation of device or acceleration/deceleration and device 800 Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-volatile computer readable storage medium storing program for executing including instruction, example are additionally provided It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of device 800 to complete the above method.
Figure 10 is a kind of block diagram of resource transfer analytical equipment 1900 shown according to an exemplary embodiment.For example, dress Setting 1900 may be provided as a server.Referring to Fig.1 0, it further comprises one that device 1900, which includes processing component 1922, Or multiple processors and memory resource represented by a memory 1932, it can holding by processing component 1922 for storing Capable instruction, such as application program.The application program stored in memory 1932 may include one or more each A module for corresponding to one group of instruction.In addition, processing component 1922 is configured as executing instruction, to execute the above method.
Device 1900 can also include that a power supply module 1926 be configured as the power management of executive device 1900, and one Wired or wireless network interface 1950 is configured as device 1900 being connected to network and input and output (I/O) interface 1958.Device 1900 can be operated based on the operating system for being stored in memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
In the exemplary embodiment, a kind of non-volatile computer readable storage medium storing program for executing including instruction, example are additionally provided It such as include the memory 1932 of instruction, above-metioned instruction can be executed by the processing component 1922 of device 1900 to complete the above method.
The present invention can be system, method and/or computer program product.Computer program product may include computer Readable storage medium storing program for executing, containing for making processor realize the computer-readable program instructions of various aspects of the invention.
Computer readable storage medium, which can be, can keep and store the tangible of the instruction used by instruction execution equipment Equipment.Computer readable storage medium for example can be-- but it is not limited to-- storage device electric, magnetic storage apparatus, optical storage Equipment, electric magnetic storage apparatus, semiconductor memory apparatus or above-mentioned any appropriate combination.Computer readable storage medium More specific example (non exhaustive list) includes: portable computer diskette, hard disk, random access memory (RAM), read-only deposits It is reservoir (ROM), erasable programmable read only memory (EPROM or flash memory), static random access memory (SRAM), portable Compact disk read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical coding equipment, for example thereon It is stored with punch card or groove internal projection structure and the above-mentioned any appropriate combination of instruction.Calculating used herein above Machine readable storage medium storing program for executing is not interpreted that instantaneous signal itself, the electromagnetic wave of such as radio wave or other Free propagations lead to It crosses the electromagnetic wave (for example, the light pulse for passing through fiber optic cables) of waveguide or the propagation of other transmission mediums or is transmitted by electric wire Electric signal.
Computer-readable program instructions as described herein can be downloaded to from computer readable storage medium it is each calculate/ Processing equipment, or outer computer or outer is downloaded to by network, such as internet, local area network, wide area network and/or wireless network Portion stores equipment.Network may include copper transmission cable, optical fiber transmission, wireless transmission, router, firewall, interchanger, gateway Computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment are received from network to be counted Calculation machine readable program instructions, and the computer-readable program instructions are forwarded, for the meter being stored in each calculating/processing equipment In calculation machine readable storage medium storing program for executing.
Computer program instructions for executing operation of the present invention can be assembly instruction, instruction set architecture (ISA) instructs, Machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programming languages The source code or object code that any combination is write, the programming language include the programming language-of object-oriented such as Smalltalk, C++ etc., and conventional procedural programming languages-such as " C " language or similar programming language.Computer Readable program instructions can be executed fully on the user computer, partly execute on the user computer, be only as one Vertical software package executes, part executes on the remote computer or completely in remote computer on the user computer for part Or it is executed on server.In situations involving remote computers, remote computer can pass through network-packet of any kind It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).In some embodiments, by utilizing computer-readable program instructions Status information carry out personalized customization electronic circuit, such as programmable logic circuit, field programmable gate array (FPGA) or can Programmed logic array (PLA) (PLA), the electronic circuit can execute computer-readable program instructions, to realize each side of the invention Face.
Referring herein to according to the method for the embodiment of the present invention, the flow chart of device (system) and computer program product and/ Or block diagram describes various aspects of the invention.It should be appreciated that flowchart and or block diagram each box and flow chart and/ Or in block diagram each box combination, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to general purpose computer, special purpose computer or other programmable datas The processor of processing unit, so that a kind of machine is produced, so that these instructions are passing through computer or other programmable datas When the processor of processing unit executes, function specified in one or more boxes in implementation flow chart and/or block diagram is produced The device of energy/movement.These computer-readable program instructions can also be stored in a computer-readable storage medium, these refer to It enables so that computer, programmable data processing unit and/or other equipment work in a specific way, thus, it is stored with instruction Computer-readable medium then includes a manufacture comprising in one or more boxes in implementation flow chart and/or block diagram The instruction of the various aspects of defined function action.
Computer-readable program instructions can also be loaded into computer, other programmable data processing units or other In equipment, so that series of operation steps are executed in computer, other programmable data processing units or other equipment, to produce Raw computer implemented process, so that executed in computer, other programmable data processing units or other equipment Instruct function action specified in one or more boxes in implementation flow chart and/or block diagram.
The flow chart and block diagram in the drawings show the system of multiple embodiments according to the present invention, method and computer journeys The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation One module of table, program segment or a part of instruction, the module, program segment or a part of instruction include one or more use The executable instruction of the logic function as defined in realizing.In some implementations as replacements, function marked in the box It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be held substantially in parallel Row, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or The combination of each box in flow chart and the box in block diagram and or flow chart, can the function as defined in executing or dynamic The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.
Various embodiments of the present invention are described above, above description is exemplary, and non-exclusive, and It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill Many modifications and changes are obvious for the those of ordinary skill in art field.The selection of term used herein, purport In the principle, practical application or technological improvement to the technology in market for best explaining each embodiment, or lead this technology Other those of ordinary skill in domain can understand each embodiment disclosed herein.

Claims (13)

1. a kind of resource transfer analysis method characterized by comprising
Obtain the call operation for being directed to resource;
In the case where getting the call operation, when determining call operation from local layer identification code, the calling behaviour Work meets analysis condition;
In the case where the call operation meets analysis condition, analyzes and record calling letter corresponding with the call operation Breath;
In the case where meeting information output condition, recorded recalls information is exported.
2. the method according to claim 1, wherein the method also includes:
Store corresponding with the call operation obtained thread identification in the first memory space, and with first mark to work as The corresponding thread identification of call operation of preceding progress is marked.
3. according to the method described in claim 2, it is characterized in that, in the case where getting the call operation, in determination When call operation is from local layer identification code, the call operation meets analysis condition, comprising:
Inquire in first memory space whether have it is corresponding with the call operation currently obtained, labeled as it is described first mark The thread identification of note;
Do not have in first memory space corresponding with the call operation currently obtained, labeled as first label In the case where thread identification, determine that the call operation from local layer identification code, judges that the call operation meets analysis item Part.
4. the method according to claim 1, wherein in the case where the call operation meets analysis condition, It analyzes and records recalls information corresponding with the call operation, comprising:
In the case where the call operation is to apply for the calling of resource, storage and the call operation in the second memory space Corresponding recalls information;
In the case where the call operation is to discharge the calling of resource, deleted and the calling from second memory space Operate corresponding recalls information.
5. according to the method described in claim 4, it is characterized in that, output is remembered in the case where meeting information output condition The recalls information of record, comprising:
Monitor whether that there are recalls information output orders;
There are recalls information output order, it is judged as and meets information output condition;
In the case where meeting information output condition, is read from second memory space and export stored calling letter Breath.
6. the method according to claim 1, wherein obtaining the call operation for being directed to resource, comprising:
Kidnap the call operation for being directed to application programming interface API.
7. a kind of resource transfer analytical equipment characterized by comprising
Module is obtained, for obtaining the call operation for being directed to resource;
Judgment module, for determining call operation from local layer identification code in the case where getting the call operation When, the call operation meets analysis condition;
Logging modle is analyzed, in the case where the call operation meets analysis condition, analyzing and recording and the calling Operate corresponding recalls information;
Output module, for exporting recorded recalls information in the case where meeting information output condition.
8. device according to claim 7, which is characterized in that described device further include:
Memory module is identified, for storing thread identification corresponding with the call operation obtained in the first memory space, And thread identification corresponding with the call operation currently carried out is marked with the first label.
9. device according to claim 8, which is characterized in that the judgment module includes:
Mark inquiry submodule, for inquire in first memory space whether have it is corresponding with the call operation currently obtained , labeled as it is described first label thread identification;
First judging submodule, for do not have in first memory space it is corresponding with the call operation currently obtained, In the case where the thread identification marked labeled as described first, determine the call operation from local layer identification code, the tune Meet analysis condition with operation.
10. device according to claim 7, which is characterized in that the analysis logging modle includes:
First analysis submodule, for the call operation be apply resource calling in the case where, in the second memory space It is middle to store recalls information corresponding with the call operation;
Second analysis submodule, for being stored from described second in the case where the call operation is to discharge the calling of resource Recalls information corresponding with the call operation is deleted in space.
11. device according to claim 10, which is characterized in that the output module includes:
Command monitoring submodule, for monitoring whether that there are recalls information output orders;
Second judgment submodule, for being judged as and meeting information output condition there are recalls information output order;
First output sub-module, for being read simultaneously from second memory space in the case where meeting information output condition Export stored recalls information.
12. device according to claim 7, which is characterized in that the acquisition module includes:
Submodule is kidnapped, for kidnapping the call operation for being directed to application programming interface API.
13. a kind of resource transfer analytical equipment characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Obtain the call operation for being directed to resource;
In the case where getting the call operation, when determining call operation from local layer identification code, the calling behaviour Work meets analysis condition;
In the case where the call operation meets analysis condition, analyzes and record calling letter corresponding with the call operation Breath;
In the case where meeting information output condition, recorded recalls information is exported.
CN201611154713.9A 2016-12-14 2016-12-14 Resource transfer analysis method and device Active CN106598858B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611154713.9A CN106598858B (en) 2016-12-14 2016-12-14 Resource transfer analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611154713.9A CN106598858B (en) 2016-12-14 2016-12-14 Resource transfer analysis method and device

Publications (2)

Publication Number Publication Date
CN106598858A CN106598858A (en) 2017-04-26
CN106598858B true CN106598858B (en) 2019-10-22

Family

ID=58802472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611154713.9A Active CN106598858B (en) 2016-12-14 2016-12-14 Resource transfer analysis method and device

Country Status (1)

Country Link
CN (1) CN106598858B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674201A (en) * 2019-09-17 2020-01-10 上海数禾信息科技有限公司 Method and device for checking enterprise credit worthiness calling condition
CN110708539A (en) * 2019-11-15 2020-01-17 成都网丁科技有限公司 Method and system for detecting pause of IPTV live broadcast service
CN111694747B (en) * 2020-06-17 2023-03-28 抖音视界有限公司 Thread detection method, device, equipment and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102186167A (en) * 2011-04-11 2011-09-14 中兴通讯股份有限公司 Method and system for monitoring applications
CN102609308A (en) * 2011-12-22 2012-07-25 深圳市万兴软件有限公司 Non-main thread failure method and device
CN102708010A (en) * 2012-05-02 2012-10-03 奇智软件(北京)有限公司 Compression tool resource transferring method and device
US8504873B1 (en) * 2004-06-29 2013-08-06 Symantec Operating Corporation Method and apparatus for providing in-memory checkpoint services within a distributed transaction
CN105373729A (en) * 2015-12-24 2016-03-02 北京奇虎科技有限公司 Information processing method and system
CN105868090A (en) * 2015-01-21 2016-08-17 中兴通讯股份有限公司 Terminal operation record management method and apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504873B1 (en) * 2004-06-29 2013-08-06 Symantec Operating Corporation Method and apparatus for providing in-memory checkpoint services within a distributed transaction
CN102186167A (en) * 2011-04-11 2011-09-14 中兴通讯股份有限公司 Method and system for monitoring applications
CN102609308A (en) * 2011-12-22 2012-07-25 深圳市万兴软件有限公司 Non-main thread failure method and device
CN102708010A (en) * 2012-05-02 2012-10-03 奇智软件(北京)有限公司 Compression tool resource transferring method and device
CN105868090A (en) * 2015-01-21 2016-08-17 中兴通讯股份有限公司 Terminal operation record management method and apparatus
CN105373729A (en) * 2015-12-24 2016-03-02 北京奇虎科技有限公司 Information processing method and system

Also Published As

Publication number Publication date
CN106598858A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
US20170300503A1 (en) Method and apparatus for managing video data, terminal, and server
CN109359056B (en) Application program testing method and device
CN104156233B (en) Light application off-line update method, device and terminal
CN106598858B (en) Resource transfer analysis method and device
CN109493852A (en) A kind of evaluating method and device of speech recognition
CN105512685A (en) Object identification method and apparatus
CN110175223A (en) A kind of method and device that problem of implementation generates
CN110941942A (en) Method, device and system for checking circuit schematic diagram
CN114240882A (en) Defect detection method and device, electronic equipment and storage medium
CN108259991A (en) Method for processing video frequency and device
CN104375828A (en) Method and device for optimizing memory
CN111274426A (en) Category labeling method and device, electronic equipment and storage medium
EP3786822A1 (en) Method for processing information, ue, server, computer program, and storage medium
CN108780048A (en) A kind of method, detection device and the readable storage medium storing program for executing of determining detection device
CN111221733A (en) Information processing method and device, mobile terminal and storage medium
CN104915290A (en) Application testing method and device
US20150179184A1 (en) Compensating For Identifiable Background Content In A Speech Recognition Device
CN109635142A (en) Image-selecting method and device, electronic equipment and storage medium
CN112241361A (en) Test case generation method and device and problem scene automatic reproduction method and device
CN105635197A (en) Fault processing method and device
CN109726709A (en) Icon-based programming method and apparatus based on convolutional neural networks
CN105354017A (en) Information processing method and apparatus
CN109671051A (en) Picture quality detection model training method and device, electronic equipment and storage medium
CN106656746A (en) Information output method and device
CN109495765A (en) Video intercepting method and device

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100080 Beijing Haidian District city Haidian street A Sinosteel International Plaza No. 8 block 5 layer A, C

Patentee after: Youku network technology (Beijing) Co.,Ltd.

Address before: 100080 Beijing Haidian District city Haidian street A Sinosteel International Plaza No. 8 block 5 layer A, C

Patentee before: 1VERGE INTERNET TECHNOLOGY (BEIJING) Co.,Ltd.

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20200714

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 100080 Beijing Haidian District city Haidian street A Sinosteel International Plaza No. 8 block 5 layer A, C

Patentee before: Youku network technology (Beijing) Co.,Ltd.

TR01 Transfer of patent right