CN111274155B - Memory operation recording method, device, equipment and storage medium of dynamic library - Google Patents

Memory operation recording method, device, equipment and storage medium of dynamic library Download PDF

Info

Publication number
CN111274155B
CN111274155B CN202010116208.5A CN202010116208A CN111274155B CN 111274155 B CN111274155 B CN 111274155B CN 202010116208 A CN202010116208 A CN 202010116208A CN 111274155 B CN111274155 B CN 111274155B
Authority
CN
China
Prior art keywords
function
memory operation
memory
dynamic library
address
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
CN202010116208.5A
Other languages
Chinese (zh)
Other versions
CN111274155A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010116208.5A priority Critical patent/CN111274155B/en
Publication of CN111274155A publication Critical patent/CN111274155A/en
Application granted granted Critical
Publication of CN111274155B publication Critical patent/CN111274155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a memory operation recording method and device of a dynamic library, computer equipment and a storage medium. The method comprises the following steps: in the running process of the application to be tested, responding to the call of the memory operation function, and acquiring the called function address and the current memory operation information; obtaining the identification of the dynamic library which initiates the calling of the memory operation function at this time through the function address; and writing the identification of the dynamic library and the memory operation information into a memory operation log. Because the memory operation log obtained by the scheme simultaneously contains the memory operation information and the identification of the dynamic library initiating the calling, compared with a simple PSS, the method can embody the respective memory occupation condition of each dynamic library in the operation process of the application to be tested in a finer granularity, thereby improving the effect of memory occupation analysis.

Description

Memory operation recording method, device, equipment and storage medium of dynamic library
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a memory operation recording method and device of a dynamic library, computer equipment and a storage medium.
Background
In the development of an application program, in order to avoid that the application program occupies too much memory resources to affect the normal operation of the application program, the memory occupation of the application program needs to be tested.
In the related art, a developer of an application program can test the memory usage of the application program through a memory analysis function in an application program development tool. Taking the development of the application of the mobile phone as an example, after a developer develops an application, the application is run in the mobile phone, and simultaneously, the mobile phone and the computer are connected through a Universal Serial Bus (USB), and a memory analysis function in an application program development tool is started in the computer, and then, the application program development tool can continuously obtain a physical memory (PSS) actually used by the mobile phone in the process of running the application.
However, the scheme shown in the related art can only obtain the actually used physical memory PSS in the application running process, and the PSS can only indicate whether the memory occupancy is abnormal, and cannot assist in analyzing the cause of the abnormal memory occupancy, so that the memory occupancy analysis effect is poor.
Disclosure of Invention
The embodiment of the application provides a memory operation recording method and device of a dynamic library, computer equipment and a storage medium, which can improve the effect of memory occupation analysis, and the technical scheme is as follows:
in one aspect, a method for recording memory operations of a dynamic library is provided, where the method is performed by a computer device running an application under test, and the method includes:
in the running process of the application to be tested, responding to the call of the memory operation function, and acquiring the called function address and the current memory operation information;
obtaining the identification of the dynamic library which initiates the calling of the memory operation function at this time through the function address;
and writing the identification of the dynamic library and the memory operation information into a memory operation log.
In another aspect, an apparatus for recording memory operations of a dynamic library, for use in a computer device running an application under test, is provided, where the apparatus includes:
the first acquisition module is used for responding to the calling of the memory operation function in the running process of the application to be tested and acquiring the called function address and the current memory operation information;
the second obtaining module is used for obtaining the identifier of the dynamic library initiating the calling of the memory operation function at this time through the function address;
and the writing module is used for writing the identification of the dynamic library and the memory operation information into a memory operation log.
In a possible implementation manner, the first obtaining module includes:
the interception unit is used for intercepting the call of the memory operation function through a hook function;
the backtracking unit is used for backtracking the function call stack of the memory operation function to obtain the function address;
and the call execution unit is used for executing the call of the memory operation function to obtain the memory operation information.
In a possible implementation manner, the backtracking unit is configured to,
performing stack backtracking through expansion operation, and storing the function call stack obtained by backtracking as a first array;
and extracting the elements in the first array as the function addresses.
In a possible implementation manner, the second obtaining module includes:
the symbol information acquisition unit is used for acquiring a function by calling an address symbol to acquire symbol information of the function address;
and the identification acquisition unit is used for acquiring the identification of the dynamic library from the symbol information.
In a possible implementation manner, the symbol information obtaining unit is configured to,
acquiring a function by calling the address symbol, and converting the function address into a specified data structure;
acquiring the designated data structure as the symbol information;
and the identification acquisition unit is used for extracting the target field in the specified data structure as the identification of the dynamic library.
In a possible implementation manner, the memory operation information includes a memory size, a target memory address, and an identifier of the memory operation function;
the write-in module is configured to store the size of the memory, the target memory address, the identifier of the memory operation function, and the identifier of the dynamic library as one piece of log data in the memory operation log.
In a possible implementation manner, the writing module is configured to write, in response to that the dynamic library is a specified dynamic library, the identifier of the dynamic library and the memory operation information into the memory operation log.
In one possible implementation, the apparatus further includes:
the first interface display module is used for displaying a dynamic library setting interface before the first acquisition module responds to the calling of the memory operation function in the running process of the tested application, and the called function address and the current memory operation information are acquired;
and the dynamic library setting module is used for responding to the setting operation in the dynamic library setting interface and setting the appointed dynamic library.
In one possible implementation, the apparatus further includes:
and the output module is used for responding to the running end of the application to be tested and outputting the memory operation log to the target equipment.
In one possible implementation manner, the output module is configured to,
outputting the memory operation log to the target device through a Universal Serial Bus (USB) interface;
or,
and outputting the memory operation log to the target equipment through the internet address corresponding to the target equipment.
In one possible implementation, the apparatus further includes:
the second interface display module is used for displaying an address setting interface before the output device outputs the memory operation log to the target device through the internet address corresponding to the target device;
and the address setting module is used for responding to the setting operation in the address setting interface and setting the internet address corresponding to the target equipment.
In one possible implementation, the memory operation function includes at least one of the following functions:
the method comprises the steps of dynamic memory allocation function malloc, dynamic memory allocation and initialization function calloc, dynamic memory adjustment function realloc, queue alignment memory allocation function memalign and memory release function free.
In another aspect, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the memory operation recording method of the dynamic library as described above.
In another aspect, a computer readable storage medium is provided, in which at least one instruction, at least one program, a set of codes, or a set of instructions is stored, which is loaded and executed by a processor to implement the memory operation recording method of a dynamic library as described above.
The technical scheme provided by the application can comprise the following beneficial effects:
in the process of running the application to be tested, when the memory operation function is called, the function address and the memory operation information are obtained, the identifier of the dynamic library initiating the calling is obtained through the function address, and the identifier of the dynamic library and the memory operation information are written into the memory operation log together.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a system configuration diagram of an application development test system according to various embodiments of the present application;
FIG. 2 is a flow diagram illustrating a method for memory operation logging for a dynamic library, according to an example embodiment;
FIG. 3 is a flow diagram illustrating a method for memory operation logging for a dynamic library in accordance with an illustrative embodiment;
FIG. 4 is a functional relationship diagram of a trace back function call stack according to the embodiment shown in FIG. 3;
FIG. 5 is a diagram illustrating a data format of a memory operation log according to the embodiment shown in FIG. 3;
FIG. 6 is a schematic diagram of a dynamic library setup interface according to the embodiment shown in FIG. 3;
FIG. 7 is a diagram illustrating memory operation records according to the embodiment shown in FIG. 3;
FIG. 8 is a block diagram illustrating the architecture of a memory operation recording device for a dynamic library in accordance with an illustrative embodiment;
FIG. 9 is a schematic diagram illustrating a configuration of a computer device in accordance with an illustrative embodiment;
FIG. 10 is a block diagram illustrating a computer device according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The embodiment of the application provides a recording scheme of memory operation, and the scheme can record the memory operation in the application running process with finer granularity compared with the PSS. For ease of understanding, the terms referred to in this application are explained below.
1) Dynamic library
A dynamic library is a non-executable binary program file that allows programs to share code and other resources necessary to perform a particular task.
Dynamic libraries, also known as Dynamic Link Library (DLL), are one way to implement the concept of shared function libraries in operating systems.
Dynamic linking provides a way for a process to call functions that do not belong to its executable code. The executable code for the functions is located in a DLL file that contains one or more functions that have been compiled, linked and stored separately from the process in which they are used. DLLs also facilitate sharing of data and resources. Multiple applications can simultaneously access the contents of a single DLL copy in memory.
Updates can be more easily applied to individual modules using dynamically linked libraries without affecting other parts of the program. For example, with a large network game, if the code of a whole game of hundreds of MB or even several GB is put in an application, the modification work at a later date will be time consuming, and if the code of different functions is put in several dynamic link libraries, respectively, the update can be applied without regenerating or installing the whole program.
A dynamic link library file is a non-executable binary program file that allows programs to share code and other resources necessary to perform a particular task.
2) Hook function
The Hook (Hook) function is a technique for changing the result of an api execution by modifying the api function entry point to change its address to point to a new custom function.
The hook function is part of the message processing mechanism of the operating system, and by setting a hook, an application program can filter all messages and events at a system level and access messages which cannot be accessed under normal conditions. The essence of a hook is a program that handles system messages and is hooked into the system through a system call.
Referring to fig. 1, a system configuration diagram of an application development test system according to various embodiments of the present application is shown. As shown in fig. 1, the system includes an application development device 120 and an application execution device 140.
The application development device 120 is a computer device for a developer to develop an application program. For example, the application development device 120 may be a personal computer, a mobile workstation, or the like.
The application execution device 140 may be a computer device that executes an application developed by a developer. For example, the application execution device 140 may be a smart phone, a tablet computer, an e-book reader, smart glasses, a smart watch, an MP3 player (Moving Picture Experts Group Audio Layer III, mpeg Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, mpeg Audio Layer 4), a laptop or a desktop computer, and so on. Alternatively, the application execution device 140 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, or the like.
The application development device 120 and the application execution device 140 may be connected by a wire. For example, the application development device 120 and the application execution device 140 may be connected via USB.
Alternatively, the application development device 120 and the application execution device 140 may be connected to each other via a communication network. Optionally, the communication network is a wired network or a wireless network.
Optionally, the wireless network or wired network described above uses standard communication techniques and/or protocols. The Network is typically the Internet, but may be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wireline or wireless Network, a private Network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
Fig. 2 is a flowchart illustrating a method for recording memory operations of a dynamic library according to an exemplary embodiment, where the method for recording memory operations of a dynamic library can be used in a computer device running an application under test, such as the application running device 140 shown in fig. 1. As shown in fig. 2, the method for recording the memory operation of the dynamic library may include the following steps:
and step 21, responding to the call of the memory operation function in the running process of the application to be tested, and acquiring the called function address and the current memory operation information.
The memory operation function may be a function of allocating or releasing memory.
For example, the memory operation function may include at least one of the following functions:
the method comprises the steps of dynamic memory allocation function malloc, dynamic memory allocation and initialization function calloc, dynamic memory adjustment function realloc, queue alignment memory allocation function memalign and memory release function free.
Optionally, the memory operation information may include at least one of the following information:
memory size, target memory address, and identification of memory operation function.
And step 22, obtaining the identifier of the dynamic library initiating the call of the memory operation function at this time through the function address.
Step 23, writing the identifier of the dynamic library and the memory operation information into a memory operation log.
To sum up, according to the scheme shown in the embodiment of the present application, in the process of running the application to be tested, when the memory operation function of the computer device is called, the function address and the memory operation information are obtained, the identifier of the dynamic library initiating the call is obtained through the function address, and the identifier of the dynamic library and the memory operation information are written into the memory operation log together.
Fig. 3 is a flowchart illustrating a method for recording memory operations of a dynamic library according to an exemplary embodiment, where the method for recording memory operations of a dynamic library can be used in a computer device running an application under test, such as the application running device 140 shown in fig. 1. As shown in fig. 3, the method for recording the memory operation of the dynamic library may include the following steps:
step 301, intercepting the call of the memory operation function by the hook function in the running process of the application to be tested.
In this embodiment of the present application, in the running process of the application to be tested, when a certain dynamic library needs to perform a memory operation, for example, occupy or release a memory, a corresponding memory operation function may be called.
Correspondingly, the computer equipment can monitor the call of the memory operation function in the operation system through the Hook function, when a call event of the memory operation function occurs in the operation system, the call is directed to the self-defined function through the Hook function, and the self-defined function executes the steps of function address acquisition, function call and the like. The execution process of the custom function can refer to the subsequent steps.
Step 302, trace back the function call stack of the memory operation function to obtain the function address.
Optionally, the computer device may perform stack backtracking through an expansion operation, and store the function call stack obtained by backtracking as a first array; and extracts the elements in the first array as the function address.
The unfolding operation may be an unwind operation.
The execution of the program may be viewed as a continuous function call. When a function finishes executing, the program returns to the next instruction (immediately call instruction) of the call instruction to continue executing. The function call procedure is typically implemented using stacks, one call stack structure (call stack) for each user-mode process. The compiler uses the stack transfer function parameters, save return addresses, and temporarily save the original values of registers (i.e., the context of the function call) for recovery and storage of local variables.
The stack layout and function calling method of different processors and compilers may be different, but the basic concept of the stack is the same.
Function calls are usually nested, with multiple functions' information in the stack at the same time. Each function that does not complete a run occupies a separate contiguous area, called a Stack Frame (Stack Frame). A stack frame is a logical segment of a stack that is pushed onto the stack when a function is called and popped off the stack when a function returns. The stack frame stores function parameters, local variables, data required for restoring the previous stack frame, and the like.
The compiler makes use of stack frames to make the allocation and release of function parameters and local variables in the function transparent. Before the compiler hands over the control right to the function itself, a specific code is inserted to push the parameters of the function into the stack frame, and enough memory space is allocated for storing the local variables in the function. One benefit of using stack frames is that recursion is made possible because each recursive call to a function is assigned a new stack frame to the function, thus isolating the current call from the last call.
According to the scheme, the function call stack of the memory operation function is traced back through the unwind operation, so that the function address is obtained.
Step 303, executing the call to the memory operation function to obtain the memory operation information.
The computer equipment can call functions such as malloc, calloc, realloc, memalign, free and the like through memory allocation during hook running, replace the functions with self-defined functions, and use an unwind backtracking function call stack in the self-defined functions.
The self-defined function refers to a packaging function realized by a developer, for example, a malloc call is replaced by a self-defined myMalloc function, a rewind backtracking call stack is executed in the function, and then a real malloc function is executed.
For example:
the execution process of the custom function myMalloc () is as follows:
1) using a unwind backtracking stack, saving a function call stack into an array, wherein elements in the array are function addresses;
2) calling the real malloc to allocate the memory.
Typically, the call stack of an Advanced Reduced Instruction Set computer microprocessor (ARM) is expanded from a high address to a low address. In the ARM, a function call stack is increased from a high address to a low address, and when the function calls, PC, LR, IP and FP registers are respectively pushed into the stack, and then sp pointers are moved to open up stack space for the current program.
The meaning of the PC, LR, IP and FP registers is as follows:
PC, program counter. The instruction currently being run by the program is placed in the PC register.
IP, Instruction Pointer, used to control the execution sequence of instructions in the program.
FP, frame pointer. Usually pointing to the bottom of a stack frame of a function, indicating the starting position of a stack of functions.
LR, link register. When the function is called, the next instruction to be executed after the function is returned is put into the LR register, and the next instruction corresponds to the return address under the x86 architecture.
The call stack grows from a high address to a low address, when a function calls, the registers of PC, LR, IP and FP are respectively pressed into the stack, and then a stack top pointer (SP) is moved to open up stack space for the current program. Where SP points to the top position of the current stack space, which moves together when push and pop are performed.
In the embodiment of the application, the computer device may obtain a PC value of each layer of the function call stack through the Unwind _ Backtrace function, obtain an address of each layer of the function call stack, and obtain a dynamic library name where the function is located by dereferencing the function address through dladdr. Please refer to fig. 4, which shows a functional relationship diagram of a trace-back function call stack according to an embodiment of the present application.
And step 304, acquiring the identifier of the dynamic library initiating the call of the memory operation function at this time through the function address.
Optionally, the computer device may obtain the function by calling the address symbol to obtain symbol information of the function address; and obtaining the identification of the dynamic library from the symbol information.
Optionally, when obtaining the symbolic information of the function address by calling an address symbolic obtaining function, the computer device may convert the function address into an assigned data structure by calling the address symbolic obtaining function; the specified data structure is acquired as the symbol information.
Accordingly, upon obtaining the identification of the dynamic library from the symbolic information, the computer device may extract the target field in the specified data structure as the identification of the dynamic library.
Optionally, taking an example that an operating system of the computer device is an android system, the address sign obtaining function may be dladdr, where dladdr is a linux system call, and may convert a function address into a Dl _ info data structure. The computer equipment can analyze the function address in the function call stack through dladdr, then obtain the name of the dynamic library initiated by the function call through the dli _ fname field in the Dl _ info structure, and then obtain the identifier of the dynamic library.
In the linux system, when dlopen is called in a certain process to open a dynamic link library, a link of the process is correspondingly maintained, basic information such as address space of the name of the newly loaded dynamic library in the process is added, and then the symbol is updated. Therefore, as long as the link is traversed, the name of the dynamic library can be found out by knowing which item address the address of the searched function address is in, and then the relative address in the dynamic library is obtained by subtracting the starting address loaded by the process, which is the principle of dladdr. Therefore, by dladdr, the symbol name and the file where the symbol name is located can be resolved from the function pointer, that is, the dynamic library identifier is obtained by resolution.
Step 305, writing the identifier of the dynamic library and the memory operation information into a memory operation log.
Optionally, the memory operation information includes a memory size, a target memory address, and an identifier of the memory operation function.
When writing the identifier of the dynamic library and the memory operation information into a memory operation log, the computer device may store the memory size, the target memory address, the identifier of the memory operation function, and the identifier of the dynamic library as a log data in the memory operation log.
Please refer to fig. 5, which illustrates a data format diagram of a memory operation log according to an embodiment of the present application.
For example, as shown in FIG. 5, the first char byte represents which function of malloc, calloc, realloc, memalign, and free is used; the second int four bytes represents the allocated memory size; the third int four bytes represents the operation target memory address; the fourth int four bytes represent that the name of the dynamic library of the memory operation source is the second in the hook list. With the data structure shown in fig. 5, the log can be recorded only by 13 bytes in one memory operation.
Optionally, the memory operation information may further include other information, for example, time information of the memory operation may be further included.
Optionally, when writing the identifier of the dynamic library and the memory operation information into the memory operation log, the computer device may write the identifier of the dynamic library and the memory operation information into the memory operation log in response to the dynamic library being a designated dynamic library.
The development personnel can preset one or more appointed dynamic libraries, and when the memory analysis is carried out, the computer equipment can only record the memory operation logs of the appointed dynamic libraries, so that all memory operations are prevented from being recorded.
Optionally, before the called function address and the current memory operation information are taken, the computer device may display a dynamic library setting interface; the specified dynamic library is set in response to a setting operation in the dynamic library setting interface.
In this embodiment, the computer device may provide a setting interface of the specified dynamic library, so that a developer selects the specified dynamic library that needs to be recorded by the memory operation.
For example, please refer to fig. 6, which illustrates a schematic diagram of a dynamic library setting interface according to an embodiment of the present application. As shown in fig. 6, when setting a specific dynamic library, a developer may open a dynamic library setting interface 61, where the dynamic library setting interface includes setting options 62 of several dynamic libraries, for example, in fig. 6, setting options of dynamic libraries such as libuty.so, libmono.so, libpandora.so, and libgcloudhvoice.so, and the developer may select one or more specific dynamic libraries through each setting option 62, for example, the developer may set the setting options of one or more specific dynamic libraries to a checking state. After the setting, the computer device can set the selected designated dynamic library as a target dynamic library which is analyzed through the hook function channel, and the configuration code of the computer device can be as follows:
PlayerPrefs.SetString(“hkkoTarget”,“libunitty|libmono”)。
step 306, in response to the end of the running of the application to be tested, outputting the memory operation log to the target device.
Optionally, the computer device may output the memory operation log to the target device through a universal serial bus USB interface.
After the test case (i.e., the application under test) is run, a memory operation log file is formed on the computer device. The developer can pull the log file from the computer device to the local target device, and can automatically generate a memory audit test report of the dynamic library by using an analysis tool subsequently.
In another possible implementation manner, the computer device may also output the memory operation log to the target device through an internet address corresponding to the target device.
The computer device may also automatically send the memory operation log to the target device through the network after generating the memory operation log.
Optionally, before outputting the memory operation log to the target device through the internet address corresponding to the target device, the computer device may further display an address setting interface; and responding to the setting operation in the address setting interface, and setting the internet address corresponding to the target equipment.
In this embodiment of the present application, a developer may also set an internet address corresponding to the target device in an address setting interface provided by the computer device, so that after the computer device generates a memory operation log after the running of the application to be tested is finished, the memory operation log is automatically sent to the target device according to the internet address set by the developer.
In another possible implementation manner, the computer device may also send the generated memory operation log to the target device in real time, for example, after the computer device calls the memory operation function each time and generates a piece of log data, the generated log data is automatically sent to the target device.
Taking a computer application through a designated application program for performing memory operation recording, where the application to be tested is a game application as an example, before starting the application to be tested, a developer may set the following information in advance in the computer device through a setting interface of the designated application program: a specified dynamic library to be analyzed, an internet address of a log output, etc. Next, please refer to fig. 7, which illustrates a schematic diagram of memory operation records according to an embodiment of the present application. As shown in fig. 7, upon detecting the start of the game application by the specified application program, the configuration record configuration may be read, and first, it is determined whether the sample is required by the HOOK memory according to the record configuration (S71), if the sample is not required by the HOOK memory, ending, if the HOOK memory is needed to be sampled, further reading the configuration, obtaining the appointed dynamic library list needing HOOK (S72), executing HOOK according to the dynamic library list (S73), namely, the above steps 301 to 304, and a block of memory is mapped by mmap for storing the memory operation log (S74), and then when HOOK is applied to the memory operation initiated by the specified dynamic library, writing a piece of log data in the memory operation log (S75), determining whether the execution of the game application is finished, alternatively, the developer closes the designated application (S76), and if not, returns to S75, and if so, transmits the memory operation log to the target device (S77). Optionally, in another possible implementation manner, after the step S75, the computer device may also send the newly generated memory operation log to the target device in real time.
To sum up, according to the scheme shown in the embodiment of the present application, in the process of running the application to be tested, when the memory operation function of the computer device is called, the function address and the memory operation information are obtained, the identifier of the dynamic library initiating the call is obtained through the function address, and the identifier of the dynamic library and the memory operation information are written into the memory operation log together.
In addition, the scheme shown in the application does not need to keep the USB connection between the computer equipment and the target equipment all the time, and the stability is high.
In addition, the scheme shown in the application can be used for setting the required specified dynamic library by developers, can be customized according to the test requirement, and is high in flexibility.
In addition, according to the scheme shown in the embodiment of the application, the load of the acquired data is small, the influence on the running of the application to be tested is small, and the method can be suitable for the application with high requirements on running resources, so that the method has a large application range.
Taking the memory analysis of the game application program as an example, in the related art, the test group can only collect the whole PSS occupation of the game. When the memory occupation abnormally increases, the increase source module cannot be positioned. Through the scheme shown in the embodiment of the application, the test group can directly report the dynamic library name with the increased memory occupation, and the problem positioning and solving efficiency is greatly improved.
In addition, through the scheme, the abnormal behavior that a certain dynamic library continuously allocates the memory without releasing can be found, the memory leakage is found, and the dynamic library of the leakage source is positioned.
Fig. 8 is a block diagram illustrating an architecture of a memory operation recording apparatus for a dynamic library according to an exemplary embodiment. The memory operation recording device of the dynamic library can be used in a computer device running an application under test to execute all or part of the steps in the embodiments shown in fig. 2 or fig. 3. The memory operation recording device of the dynamic library may include:
a first obtaining module 801, configured to, in a running process of a tested application, respond to a call to a memory operation function, and obtain a called function address and current memory operation information;
a second obtaining module 802, configured to obtain, through the function address, an identifier of a dynamic library that initiates calling of the memory operation function this time;
a writing module 803, configured to write the identifier of the dynamic library and the memory operation information into a memory operation log.
In a possible implementation manner, the first obtaining module 801 includes:
the interception unit is used for intercepting the call of the memory operation function through a hook function;
the backtracking unit is used for backtracking the function call stack of the memory operation function to obtain the function address;
and the call execution unit is used for executing the call of the memory operation function to obtain the memory operation information.
In a possible implementation manner, the backtracking unit is configured to,
performing stack backtracking through expansion operation, and storing the function call stack obtained by backtracking as a first array;
and extracting the elements in the first array as the function addresses.
In a possible implementation manner, the second obtaining module 802 includes:
the symbol information acquisition unit is used for acquiring a function by calling an address symbol to acquire symbol information of the function address;
and the identification acquisition unit is used for acquiring the identification of the dynamic library from the symbol information.
In a possible implementation manner, the symbol information obtaining unit is configured to,
acquiring a function by calling the address symbol, and converting the function address into a specified data structure;
acquiring the designated data structure as the symbol information;
and the identification acquisition unit is used for extracting the target field in the specified data structure as the identification of the dynamic library.
In a possible implementation manner, the memory operation information includes a memory size, a target memory address, and an identifier of the memory operation function;
the write-in module 803 is configured to store the memory size, the target memory address, the identifier of the memory operation function, and the identifier of the dynamic library as one piece of log data in the memory operation log.
In a possible implementation manner, the writing module 803 is configured to write, in response to that the dynamic library is a specified dynamic library, the identifier of the dynamic library and the memory operation information into the memory operation log.
In one possible implementation, the apparatus further includes:
a first interface display module, configured to display a dynamic library setting interface before the first obtaining module 801 responds to a call of a memory operation function in a running process of a tested application, and obtains a called function address and current memory operation information;
and the dynamic library setting module is used for responding to the setting operation in the dynamic library setting interface and setting the appointed dynamic library.
In one possible implementation, the apparatus further includes:
and the output module is used for responding to the running end of the application to be tested and outputting the memory operation log to the target equipment.
In one possible implementation manner, the output module is configured to,
outputting the memory operation log to the target device through a Universal Serial Bus (USB) interface;
or,
and outputting the memory operation log to the target equipment through the internet address corresponding to the target equipment.
In one possible implementation, the apparatus further includes:
the second interface display module is used for displaying an address setting interface before the output device outputs the memory operation log to the target device through the internet address corresponding to the target device;
and the address setting module is used for responding to the setting operation in the address setting interface and setting the internet address corresponding to the target equipment.
In one possible implementation, the memory operation function includes at least one of the following functions:
the method comprises the steps of dynamic memory allocation function malloc, dynamic memory allocation and initialization function calloc, dynamic memory adjustment function realloc, queue alignment memory allocation function memalign and memory release function free.
To sum up, according to the scheme shown in the embodiment of the present application, in the process of running the application to be tested, when the memory operation function of the computer device is called, the function address and the memory operation information are obtained, the identifier of the dynamic library initiating the call is obtained through the function address, and the identifier of the dynamic library and the memory operation information are written into the memory operation log together.
In addition, the scheme shown in the application does not need to keep the USB connection between the computer equipment and the target equipment all the time, and the stability is high.
In addition, the scheme shown in the application can be used for setting the required specified dynamic library by developers, can be customized according to the test requirement, and is high in flexibility.
In addition, according to the scheme shown in the embodiment of the application, the load of the acquired data is small, the influence on the running of the application to be tested is small, and the method can be suitable for the application with high requirements on running resources, so that the method has a large application range.
FIG. 9 is a schematic diagram illustrating a configuration of a computer device, according to an example embodiment. The computer device may be implemented as the application execution device 140 in the system shown in fig. 1 described above.
The computer device 900 includes a central processing unit 901, a system memory 904 including a random access memory 902 and a read only memory 903, and a system bus 905 that connects the system memory 904 and the central processing unit 901. The computer device 900 also includes a basic input/output system (I/O system) 906 for facilitating information transfer between devices within the computer, and a mass storage device 907 for storing an operating system 913, application programs 914, and other program modules 915.
The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable media provide non-volatile storage for the computer device 900. That is, the mass storage device 907 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 904 and mass storage device 907 described above may be collectively referred to as memory.
The computer device 900 may be connected to the internet or other network device through a network interface unit 911 connected to the system bus 905.
The memory further includes one or more programs, the one or more programs are stored in the memory, and the central processor 901 implements all or part of the steps of the method shown in fig. 2 or fig. 3 by executing the one or more programs.
Fig. 10 shows a block diagram of a computer device 1000 according to an exemplary embodiment of the present invention. The computer device 1000 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The computer device 1000 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like. Alternatively, the computer device 1000 may be a server on the network side.
Generally, the computer device 1000 includes: a processor 1001 and a memory 1002.
Processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 1001 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 1001 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1002 is used to store at least one instruction for execution by the processor 1001 to implement the methods provided by the method embodiments herein.
In some embodiments, the computer device 1000 may further optionally include: a peripheral interface 1003 and at least one peripheral. The processor 1001, memory 1002 and peripheral interface 1003 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1004, touch screen display 1005, camera 1006, audio circuitry 1007, positioning components 1008, and power supply 1009.
The peripheral interface 1003 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 1001 and the memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral interface 1003 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
The Radio Frequency circuit 1004 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 1004 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 1004 may communicate with other computer devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1004 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1005 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to capture touch signals on or over the surface of the display screen 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this point, the display screen 1005 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 1005 may be one, providing a front panel of the computer device 1000; in other embodiments, the display screens 1005 may be at least two, each disposed on a different surface of the computer device 1000 or in a folded design; in still other embodiments, the display screen 1005 may be a flexible display screen, disposed on a curved surface or on a folded surface of the computer device 1000. Even more, the display screen 1005 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display screen 1005 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 1006 is used to capture images or video. Optionally, the camera assembly 1006 includes a front camera and a rear camera. Generally, a front camera is disposed on a front panel of a computer apparatus, and a rear camera is disposed on a rear surface of the computer apparatus. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing or inputting the electric signals to the radio frequency circuit 1004 for realizing voice communication. For stereo sound acquisition or noise reduction purposes, the microphones may be multiple and disposed at different locations of the computer device 1000. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuit 1007 may also include a headphone jack.
The Location component 1008 is used to locate the current geographic Location of the computer device 1000 for navigation or LBS (Location Based Service). The Positioning component 1008 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in europe.
The power supply 1009 is used to supply power to the various components in the computer device 1000. The power source 1009 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 1009 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the computer device 1000 also includes one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyro sensor 1012, pressure sensor 1013, fingerprint sensor 1013, optical sensor 1015, and proximity sensor 1016.
The acceleration sensor 1011 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the computer apparatus 1000. For example, the acceleration sensor 1011 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1001 may control the touch display screen 1005 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect a body direction and a rotation angle of the computer apparatus 1000, and the gyro sensor 1012 may cooperate with the acceleration sensor 1011 to acquire a 3D motion of the user with respect to the computer apparatus 1000. From the data collected by the gyro sensor 1012, the processor 1001 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 1013 may be disposed on a side bezel of computer device 1000 and/or on a lower layer of touch display screen 1005. When the pressure sensor 1013 is disposed on a side frame of the computer device 1000, a user's holding signal to the computer device 1000 can be detected, and the processor 1001 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1013. When the pressure sensor 1013 is disposed at a lower layer of the touch display screen 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1005. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1014 is used to collect a fingerprint of the user, and the processor 1001 identifies the user according to the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 1014 may be provided on the front, back, or side of the computer device 1000. When a physical key or vendor Logo is provided on the computer device 1000, the fingerprint sensor 1014 may be integrated with the physical key or vendor Logo.
The optical sensor 1015 is used to collect the ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the touch display screen 1005 according to the intensity of the ambient light collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1005 is turned down. In another embodiment, the processor 1001 may also dynamically adjust the shooting parameters of the camera assembly 1006 according to the intensity of the ambient light collected by the optical sensor 1015.
A proximity sensor 1016, also known as a distance sensor, is typically provided on the front panel of the computer device 1000. The proximity sensor 1016 is used to capture the distance between the user and the front of the computer device 1000. In one embodiment, the processor 1001 controls the touch display screen 1005 to switch from the bright screen state to the dark screen state when the proximity sensor 1016 detects that the distance between the user and the front face of the computer device 1000 is gradually decreased; when the proximity sensor 1016 detects that the distance between the user and the front of the computer device 1000 is gradually increased, the touch display screen 1005 is controlled by the processor 1001 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in FIG. 10 is not intended to be limiting of the computer device 1000, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as a memory comprising computer programs (instructions), executable by a processor of a computer device to perform all or part of the steps of the methods shown in the various embodiments of the present application, is also provided. For example, the non-transitory computer readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (14)

1. A method for recording memory operations of a dynamic library, the method being performed by a computer device running an application under test, the method comprising:
in the running process of the application to be tested, responding to the call of the memory operation function, and acquiring the called function address and the current memory operation information;
obtaining a function by calling an address symbol to obtain symbol information of the function address;
acquiring the identifier of the dynamic library from the symbol information;
and writing the identification of the dynamic library and the memory operation information into a memory operation log.
2. The method according to claim 1, wherein the obtaining the called function address and the current memory operation information in response to the call to the memory operation function comprises:
intercepting the call of the memory operation function through a hook function;
backtracking a function call stack of the memory operation function to obtain the function address;
and executing the call of the memory operation function to obtain the memory operation information.
3. The method of claim 2, wherein the tracing back a function call stack of the memory operation function to obtain the function address comprises:
performing stack backtracking through expansion operation, and storing the function call stack obtained by backtracking as a first array;
and extracting the elements in the first array as the function addresses.
4. The method of claim 1,
the obtaining the symbol information of the function address by calling the address symbol obtaining function includes:
acquiring a function by calling the address symbol, and converting the function address into a specified data structure;
acquiring the designated data structure as the symbol information;
the obtaining the identifier of the dynamic library from the symbol information includes:
and extracting a target field in the specified data structure as the identification of the dynamic library.
5. The method of claim 1, wherein the memory operation information comprises a memory size, a target memory address, and an identification of the memory operation function;
writing the identifier of the dynamic library and the memory operation information into a memory operation log, including:
and storing the memory size, the target memory address, the identifier of the memory operation function and the identifier of the dynamic library as log data in the memory operation log.
6. The method of claim 1, wherein writing the identification of the dynamic library and the memory operation information to a memory operation log comprises:
and in response to the dynamic library being a designated dynamic library, writing the identification of the dynamic library and the memory operation information into the memory operation log.
7. The method according to claim 6, wherein before the obtaining the called function address and the current memory operation information in response to the call to the memory operation function during the running process of the application under test, the method further comprises:
displaying a dynamic library setting interface;
and responding to the setting operation in the dynamic library setting interface to set the specified dynamic library.
8. The method of claim 1, further comprising:
and responding to the running end of the application to be tested, and outputting the memory operation log to target equipment.
9. The method of claim 8, wherein outputting the memory operation log to a target device comprises:
outputting the memory operation log to the target device through a Universal Serial Bus (USB) interface;
or,
and outputting the memory operation log to the target equipment through the internet address corresponding to the target equipment.
10. The method of claim 9, wherein before outputting the memory operation log to the target device through the internet address corresponding to the target device, the method further comprises:
displaying an address setting interface;
and responding to the setting operation in the address setting interface, and setting the internet address corresponding to the target equipment.
11. The method according to any of claims 1 to 10, wherein the memory operation function comprises at least one of the following functions:
the method comprises the steps of dynamic memory allocation function malloc, dynamic memory allocation and initialization function calloc, dynamic memory adjustment function realloc, queue alignment memory allocation function memalign and memory release function free.
12. A memory operation recording apparatus for a dynamic library, for use in a computer device running an application under test, the apparatus comprising:
the first acquisition module is used for responding to the calling of the memory operation function in the running process of the application to be tested and acquiring the called function address and the current memory operation information;
the second obtaining module is used for obtaining the identifier of the dynamic library initiating the calling of the memory operation function at this time through the function address;
the writing module is used for writing the identification of the dynamic library and the memory operation information into a memory operation log;
the second acquisition module comprises a symbol information acquisition unit and an identification acquisition unit;
the symbol information acquisition unit is used for acquiring the symbol information of the function address by calling an address symbol acquisition function;
and the identification obtaining unit is used for obtaining the identification of the dynamic library from the symbol information.
13. A computer device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the memory operation recording method of a dynamic library according to any one of claims 1 to 11.
14. A computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the memory operation recording method of a dynamic library according to any one of claims 1 to 11.
CN202010116208.5A 2020-02-25 2020-02-25 Memory operation recording method, device, equipment and storage medium of dynamic library Active CN111274155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010116208.5A CN111274155B (en) 2020-02-25 2020-02-25 Memory operation recording method, device, equipment and storage medium of dynamic library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010116208.5A CN111274155B (en) 2020-02-25 2020-02-25 Memory operation recording method, device, equipment and storage medium of dynamic library

Publications (2)

Publication Number Publication Date
CN111274155A CN111274155A (en) 2020-06-12
CN111274155B true CN111274155B (en) 2021-08-06

Family

ID=70997283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010116208.5A Active CN111274155B (en) 2020-02-25 2020-02-25 Memory operation recording method, device, equipment and storage medium of dynamic library

Country Status (1)

Country Link
CN (1) CN111274155B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253825B (en) * 2020-09-22 2024-06-21 腾讯科技(深圳)有限公司 Memory leak detection method, device, computer equipment and storage medium
CN112579295B (en) * 2020-12-25 2024-05-24 百果园技术(新加坡)有限公司 Image memory analysis method, image memory analysis device, electronic equipment and storage medium
CN112860444B (en) * 2021-04-26 2021-08-20 腾讯科技(深圳)有限公司 Memory calling information determining method and device, storage medium and electronic equipment
CN113448655B (en) * 2021-07-09 2022-06-17 赞同科技股份有限公司 C standard dynamic library calling method and device
CN113835917A (en) * 2021-09-03 2021-12-24 支付宝(杭州)信息技术有限公司 Memory accounting abnormity detection method and device, electronic equipment and storage medium
CN114398296B (en) * 2022-03-24 2022-09-27 荣耀终端有限公司 Method and terminal equipment for problem location

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103033702A (en) * 2012-12-03 2013-04-10 桂林赛普电子科技有限公司 Multi-functional handheld tester of lighting protection device
CN103870208A (en) * 2012-12-17 2014-06-18 联想(北京)有限公司 Method for information processing and electronic device
CN104375828A (en) * 2014-10-27 2015-02-25 小米科技有限责任公司 Method and device for optimizing memory

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216352B2 (en) * 2002-12-12 2007-05-08 Sun Microsystems, Inc. Method of reducing interference among applications co-located in a process when using dynamic libraries
CN103294588A (en) * 2012-02-22 2013-09-11 深圳富泰宏精密工业有限公司 Memory detecting system and method
US9697150B2 (en) * 2013-09-04 2017-07-04 Jory Schwach Real-time embedded system
CN106933733B (en) * 2015-12-30 2020-03-10 华为技术有限公司 Method and device for determining memory leak position
CN106648893A (en) * 2016-12-20 2017-05-10 北京匡恩网络科技有限责任公司 Memory management method and memory management equipment
CN110781075B (en) * 2019-09-19 2022-08-30 深圳震有科技股份有限公司 Method, device and system for detecting memory leakage and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103033702A (en) * 2012-12-03 2013-04-10 桂林赛普电子科技有限公司 Multi-functional handheld tester of lighting protection device
CN103870208A (en) * 2012-12-17 2014-06-18 联想(北京)有限公司 Method for information processing and electronic device
CN104375828A (en) * 2014-10-27 2015-02-25 小米科技有限责任公司 Method and device for optimizing memory

Also Published As

Publication number Publication date
CN111274155A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
CN111274155B (en) Memory operation recording method, device, equipment and storage medium of dynamic library
CN109359262B (en) Animation playing method, device, terminal and storage medium
CN109491924B (en) Code detection method, device, terminal and storage medium
CN111752666B (en) Window display method, device and terminal
CN111338910B (en) Log data processing method, log data display method, log data processing device, log data display device, log data processing equipment and log data storage medium
CN108132790B (en) Method, apparatus and computer storage medium for detecting a garbage code
CN110275836A (en) Safety detecting method, device and the storage medium of illusory engine application
CN111737100A (en) Data acquisition method, device, equipment and storage medium
CN113867848A (en) Method, device and equipment for calling graphic interface and readable storage medium
CN112052167A (en) Method and device for generating test script code
CN113409427A (en) Animation playing method and device, electronic equipment and computer readable storage medium
CN114371985A (en) Automated testing method, electronic device, and storage medium
CN112257006A (en) Page information configuration method, device, equipment and computer readable storage medium
CN110968815A (en) Page refreshing method, device, terminal and storage medium
CN107943484B (en) Method and device for executing business function
CN112363950A (en) Application program debugging method and device
CN109634872B (en) Application testing method, device, terminal and storage medium
CN108132817B (en) Object management method and device
CN113688043B (en) Application program testing method, device, server, iOS device and medium
CN110417931B (en) Domain name resolution record acquisition method and device, computer equipment and storage medium
CN114296824A (en) Page information configuration method, device, equipment and computer readable storage medium
CN113268234A (en) Page generation method, device, terminal and storage medium
CN112860261A (en) Static code checking method and device, computer equipment and readable storage medium
CN113342635A (en) Acquisition of differential code coverage rate and differential code file sending method and device
CN113312249A (en) Log data generation method, log data display 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024103

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant