CN102148844A - Memory leak positioning method, server, client and system - Google Patents

Memory leak positioning method, server, client and system Download PDF

Info

Publication number
CN102148844A
CN102148844A CN2010101116191A CN201010111619A CN102148844A CN 102148844 A CN102148844 A CN 102148844A CN 2010101116191 A CN2010101116191 A CN 2010101116191A CN 201010111619 A CN201010111619 A CN 201010111619A CN 102148844 A CN102148844 A CN 102148844A
Authority
CN
China
Prior art keywords
information
adduction relationship
memory overflow
client
server end
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.)
Granted
Application number
CN2010101116191A
Other languages
Chinese (zh)
Other versions
CN102148844B (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.)
Shenzhen Kingdee Tianyanyun Computing Co Ltd
Original Assignee
Shenzhen Kingdee Middleware 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 Shenzhen Kingdee Middleware Co ltd filed Critical Shenzhen Kingdee Middleware Co ltd
Priority to CN201010111619.1A priority Critical patent/CN102148844B/en
Publication of CN102148844A publication Critical patent/CN102148844A/en
Application granted granted Critical
Publication of CN102148844B publication Critical patent/CN102148844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a memory leak positioning method, a server, a client and a memory leak positioning system, which belong to the technical field of networks. The method comprises the following steps of: analyzing a dump file to obtain memory leak information comprising information about a first object corresponding to a memory leak source and the information about a citation relationship causing memory leak; receiving a memory leak positioning request transmitted in a browser/server (B/S) mode from the client; and transmitting the information about the first object and the information about the citation relationship to the client, so that the client acquires the first object and the citation relationship for display according to the received information. The server comprises an analysis module, a receiving module and a transmission module. The client comprises a transmission module, the receiving module and a processing module. The system comprises the server and the client. By the method, the server, the client and the system, remote memory leak positioning is realized in a web way without the special tool usage of the client and the excessive participation of a user, and the effect of remotely and rapidly positioning the memory leak can be achieved.

Description

Method, server end, client and the system of location memory overflow
Technical field
The present invention relates to networking technology area, particularly a kind of method, server end, client and system of locating memory overflow.
Background technology
When problem takes place in application program in the process of operation, JVM (Java Virtual Machine, Java Virtual Machine) running status of system in the time of can noting the problem generation, and it is stored in heap dump file is in the dump file, so that the developer, the programmer checks and debug, for analyzing and diagnosis problem provides important basis.The running status of putting down in writing in the heap dump file generally includes the data in the Installed System Memory, and the adduction relationship between the object etc.The problem that application program takes place in running is generally memory leak issue.Utilize special-purpose instrument that heap dump file is analyzed, can navigate to the object at place, memory overflow source, and the adduction relationship between the object, and show the user.
In the prior art, usually utilize based on GUI (Graphical User Interface, graphic user interface) analysis tool comes heap dump file is analyzed, and the tree structure of adduction relationship between the reflection object is showed the user, and the user checks source of leaks in this tree structure.
But above-mentioned technology depends on special-purpose instrument, need use special-purpose instrument at server end, just can finish the location and the displaying in memory overflow source, and location and show and all finish in server end this locality.When positioning result that need be in long-range client shows memory overflow source, this technology also can't realize at present.
Summary of the invention
In order to solve prior art problems, the embodiment of the invention provides a kind of method, server end, client and system of locating memory overflow.Described technical scheme is as follows:
A kind of method of locating memory overflow, described method comprises:
Dump file analysis is obtained memory overflow information, and described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, and the termination object of described adduction relationship is described first object;
The request of the location memory overflow that the reception client is sent under browser and server B/S pattern;
The information of described first object and the information of adduction relationship are sent to described client, make described client get access to described first object and adduction relationship, and show described first object and adduction relationship according to the information of receiving.
The information of described first object and the information of adduction relationship are sent to described client, specifically comprise:
In described memory overflow information,, give described client according to the information of each object in the described adduction relationship of the order of quoting reading and sending successively, till the information of described first object is sent completely from the origin object of described adduction relationship.
Described method also comprises:
The beginning of each object in described adduction relationship read constantly, and it is reading state that status indicator is set, and makes other request that no longer responds described client under reading state;
The end of each object in described adduction relationship is read constantly, and it is non-reading state that described status indicator is set, and makes other request that can respond described client under non-reading state.
A kind of method of locating memory overflow, described method comprises:
Under browser and server B/S pattern, send the request of location memory overflow to server end;
Receive the memory overflow information that described server end returns, described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, the termination object of described adduction relationship is described first object, and described memory overflow information is to obtain after described server end is analyzed dump file;
According to the information of described first object that receives and the information of described adduction relationship, get access to described first object and adduction relationship, and show described first object and adduction relationship.
The information of described first object that described basis receives and the information of described adduction relationship get access to described first object and adduction relationship, and show described first object and adduction relationship, specifically comprise:
According to the information of described first object that receives and the information of described adduction relationship, get access to described first object and adduction relationship, generate tree structure according to described first object and adduction relationship, and show described tree structure.
A kind of server end of locating memory overflow, described server end comprises:
Analysis module, be used for dump file analysis is obtained memory overflow information, described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, and the termination object of described adduction relationship is described first object;
Receiver module is used to receive the request of the location memory overflow that client sends under browser and server B/S pattern;
Sending module, be used for after described receiver module is received described request, the information of described first object that described analysis module is obtained and the information of adduction relationship send to described client, make described client get access to described first object and adduction relationship, and show described first object and adduction relationship according to the information of receiving.
Described sending module specifically comprises:
Transmitting element, be used for after described receiver module is received described request, in the described memory overflow information that described analysis module obtains, origin object from described adduction relationship, information according to each object in the described adduction relationship of the order of quoting reading and sending is successively given described client, till the information of described first object is sent completely, make described client get access to described first object and adduction relationship, and show described first object and adduction relationship according to the information of receiving.
Described sending module also comprises:
Identify unit, be used for beginning to read constantly at each object of described adduction relationship, it is reading state that status indicator is set, make described server end under reading state, no longer respond other request of described client, and the end of each object in described adduction relationship is read constantly, it is non-reading state that described status indicator is set, and makes described server end can respond other request of described client under non-reading state.
A kind of client of locating memory overflow, described client comprises:
Sending module is used for sending to server end the request of location memory overflow under browser and server B/S pattern;
Receiver module, be used to receive the memory overflow information that described server end returns, described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, the termination object of described adduction relationship is described first object, and described memory overflow information is to obtain after described server end is analyzed dump file;
Processing module is used for the information of described first object that receives according to described receiver module and the information of described adduction relationship, gets access to described first object and adduction relationship, and shows described first object and adduction relationship.
Described processing module specifically comprises:
Processing unit, be used for the information of described first object that receives according to described receiver module and the information of described adduction relationship, get access to described first object and adduction relationship, generate tree structure according to described first object and adduction relationship, and show described tree structure.
A kind of system of locating memory overflow, described system comprises: server end and client;
Described server end, be used for dump file analysis is obtained memory overflow information, described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, and the termination object of described adduction relationship is described first object; Receive the request of the location memory overflow that described client sends under browser and server B/S pattern; The information of described first object and the information of adduction relationship are sent to described client;
Described client is used for sending to described server end the request of location memory overflow under the B/S pattern; Receive the described memory overflow information that described server end returns,, get access to described first object and adduction relationship, and show described first object and adduction relationship according to the information of wherein described first object and the information of described adduction relationship.
The technical scheme that the embodiment of the invention provides obtains memory overflow information by server end to dump file analysis, and when sending request under the B/S pattern, client sends analysis result to client, reached the purpose of long range positioning memory overflow, realized that use web (World Wide Web) mode is located and showing internal memory leaks the result.This method need not client and uses special-purpose instrument, uses the B/S mode to check the memory overflow result, need not rely on home environment, and is simple and convenient, operation easily.And, the result of memory overflow analysis need not progressively show but the disposable client that is presented at by different level, the user who need not client participates in too much, can navigate to source of leaks the user fast in the acceptable response time, the long-range location source of leaks of checking becomes and is easy to, can reach the effect of long-range quick location memory overflow, greatly improve the speed and the efficient of location.
Description of drawings
Fig. 1 is the method flow diagram of the location memory overflow that provides of the embodiment of the invention 1;
Fig. 2 is the method flow diagram of the location memory overflow that provides of the embodiment of the invention 2;
Fig. 3 is the method flow diagram of the location memory overflow that provides of the embodiment of the invention 3;
Fig. 4 is the server end structure chart of the location memory overflow that provides of the embodiment of the invention 4;
Fig. 5 is the client terminal structure figure of the location memory overflow that provides of the embodiment of the invention 5;
Fig. 6 is the system construction drawing of the location memory overflow that provides of the embodiment of the invention 6.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment 1
In order to realize the long range positioning memory overflow, referring to Fig. 1, present embodiment provides a kind of method of locating memory overflow, comprising:
101: heap dump dump file is analyzed the memory overflow information that obtains, this memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, the termination object of this adduction relationship is first object;
In the present embodiment, the memory overflow source is meant the place that memory overflow directly takes place in program operation process.Generally include a plurality of objects in this program, have multiple adduction relationship usually in these a plurality of objects.One place's memory overflow may take place during program running, also the many places memory overflow may take place, each memory overflow source all can corresponding object.When the many places memory overflow takes place, heap dump file is carried out analysis meeting obtain each self-corresponding object of a plurality of memory overflows source.Any object in the program can have one or more adduction relationship, when an object becomes the memory overflow source, not only needs to locate this object, also needs to determine because which bar adduction relationship of this object causes memory overflow.In all references relation of a program, all have an identical origin object, each bar adduction relationship all is to be begun by this origin object, refers to till the termination object of this adduction relationship through different paths.
The information of first object typically refers to the title of first object, can certainly be any information that can represent first object, and the embodiment of the invention is not done concrete qualification to this.The information of adduction relationship generally includes: the information of origin object, the information that stops object and the information of medium object, also have from origin object to begin the process medium object to the order of quoting that stops object, and this medium object can have also and can not have.Wherein, the information of each object in the adduction relationship can be to represent any information of this object, and the embodiment of the invention is not done concrete qualification to this.
102: the request of the location memory overflow that the reception client is sent under B/S (Browser/Server, browser and server) pattern;
103: the information of first object that will obtain and the information of adduction relationship send to client, make client get access to first object and adduction relationship according to the information of receiving, and show first object and adduction relationship.
The method that present embodiment provides realizes that at server end this server end can utilize existing algorithm that heap dump file is analyzed the memory overflow information that obtains usually, and the embodiment of the invention is not done concrete qualification to the algorithm of described employing.
Among the arbitrary embodiment of the present invention, unless specifically stated otherwise, all be to describe according to the situation that memory overflow source, a place occurs, when application scenarios is when the situation in memory overflow source, many places occurring, its position fixing process only is the simple repetition of the position fixing process in memory overflow source, a place, therefore, the embodiment of the invention is not done too much explanation to the situation in memory overflow source, many places.
Said method is by analyzing dump file, and sends analysis result to client when client is sent request under the B/S pattern, reached the purpose of long range positioning memory overflow, realized that use web mode is located and showing internal memory leaks the result.This method need not client and uses special-purpose instrument, uses the B/S mode to check the memory overflow result by client, need not rely on home environment, and is simple and convenient, operation easily.And, the result of memory overflow analysis need not progressively show but the disposable client that is presented at by different level, progressively click and complete demonstration to compare with existing demonstration by different level and in conjunction with the user, the user who need not client participates in too much, can navigate to source of leaks the user fast in the acceptable response time, the long-range location source of leaks of checking becomes and is easy to, and can reach the effect of long-range quick location memory overflow, has greatly improved the speed and the efficient of location.
Embodiment 2
In order to realize the long range positioning memory overflow, referring to Fig. 2, present embodiment provides a kind of method of locating memory overflow, comprising:
201: under the B/S pattern, send the request of location memory overflow to server end;
202: the memory overflow information that the reception server end returns, this memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, the termination object of this adduction relationship is first object, and this memory overflow information is to obtain after server end is analyzed heap dump dump file;
203: according to the information of first object that receives and the information of adduction relationship, get access to first object and adduction relationship, and show first object and adduction relationship.
The method that present embodiment provides realizes in client usually, this customer end adopted B/S pattern and server end carry out alternately, realized long range positioning based on the web mode, the operation of client can be realized by the browser of installing in the client particularly, this browser can be existing any browser, and the embodiment of the invention is not done concrete qualification to this.
Said method is by sending request to server end under the B/S pattern, and the memory overflow information sent according to result that dump file analysis is obtained of reception server end, get access to first object and the adduction relationship that causes memory overflow of memory overflow source correspondence, reached the purpose of long range positioning memory overflow, realized that use web mode is located and showing internal memory leaks the result.This method need not to use special-purpose instrument, uses the B/S mode to check the memory overflow result, need not rely on home environment, and is simple and convenient, operation easily.And, the result of memory overflow analysis need not progressively show but disposable showing by different level, need not the user participates in too much, can navigate to source of leaks the user fast in the acceptable response time, the long-range location source of leaks of checking becomes and is easy to, can reach the effect of long-range quick location memory overflow, greatly improve the speed and the efficient of location.
Embodiment 3
In order to realize the long range positioning memory overflow, and prevent that because the repeatedly memory overflow information disorder that brings of request, referring to Fig. 3, present embodiment provides a kind of method of locating memory overflow, comprising:
301: server end is analyzed the memory overflow information that obtains to heap dump dump file, this memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, the termination object of this adduction relationship is first object;
302: client sends the request of location memory overflow to server end under the B/S pattern;
In the present embodiment, server end and client are carried out alternately based on the web mode, and client comes to send request to server end by existing browser, and by the information that browser reception server end returns, is shown to the user then.Particularly, can adopt AJAX (Asynchronous JavaScript and Extensible Markup Language, asynchronous Java descriptive language and extend markup language) to realize that the embodiment of the invention is not done concrete qualification to this.
303: after server end was received this request, the origin object from the adduction relationship that obtains began, and gave client according to the information of each object in the order of quoting reading and sending adduction relationship successively, till the information of first object is sent completely;
At least comprise two objects in the adduction relationship that the server end analysis obtains: origin object and termination object, this stops i.e. first object of object.When obtaining an adduction relationship, the object reference order in this adduction relationship is also known, comprises each object of origin object, termination object and middle process.Particularly, can carry out the operation of reading and sending circularly, all objects in the adduction relationship are sent to client successively.
For example, adduction relationship is object A reference object B, and object B reference object C can be expressed as A->B->C, and wherein, object A is an origin object, and object C is first object, i.e. memory overflow source, and object B is a medium object.According to quoting order, the information of first reading object A sends to client then, and the information of reading object B sends to client then again, and the information of last reading object C sends to client then.
In the present embodiment, any one object both can also can be quoted other object by other object reference, and, can also can be quoted a plurality of objects by a plurality of object references, the embodiment of the invention is not done concrete qualification to this.When memory overflow source during by a plurality of object reference, then have mulitpath and arrive this memory overflow source, therefore, it specifically is that adduction relationship by the representative of which paths has caused memory overflow that the embodiment of the invention need be oriented, and other path is not then in the scope that the present invention describes.
For example, the memory overflow source is object C, and object C has two adduction relationships, A->B->C and A->D->E->C, wherein, A->B->C is the adduction relationship that causes memory overflow, then orient this adduction relationship and get final product, and an other adduction relationship A->D->E->C then need not to position.
In 303, further, status indicator can also be set, be used for identifying the current reading state that whether is in, and server end determines whether the request of client is responded according to this state, to prevent because the repeatedly memory overflow information disorder that brings of request is specific as follows:
The beginning of each object in above-mentioned adduction relationship read constantly, and it is reading state that server end is provided with status indicator, makes no longer other request of customer in response end under reading state; The end of each object in above-mentioned adduction relationship is read constantly, the server end setting is read and is designated non-reading state, make under non-reading state can the customer in response end other request, thereby guarantee that server end can not reading also imperfect tense at an object, owing to other request begins to read new object, avoided causing the data read disorder again.
304: client according to the information of this first object and the information of adduction relationship, gets access to first object and adduction relationship, and shows first object and adduction relationship after receiving the information of the information of first object that server end is sent and adduction relationship.
In the present embodiment, when server end is analyzed heap dump dump file, not only can obtain causing the adduction relationship of memory overflow, can also obtain and other irrelevant adduction relationship of memory overflow, the adduction relationship of all objects in the program that also can be applied.Under the situation of other adduction relationship that obtains haveing nothing to do, can also other adduction relationship also be sent to client show according to the needs of client with memory overflow.For example, server end obtains multiple adduction relationship after heap dump file is analyzed, wherein, comprise: the adduction relationship A->B->C that causes memory overflow, and with irrelevant other adduction relationship C->D->E of memory overflow, C->F->G and B->H->I or the like, when server end is given client in the information that sends A->B->C, further, can also be according to the request of client, with other adduction relationship C->D->E, C->F->G and B->H->I also sends to client to be showed, checks with the user who makes things convenient for client.
In the present embodiment, the information of first object that server end is sent and the information of adduction relationship can realize in a variety of forms, and as in mode of the mode of text, illustrated mode, script or the like, the embodiment of the invention is not done concrete qualification to this.Preferably, server end sends to client with the information of the information of first object and adduction relationship in the mode of script, after client is received, carry out this script by the browser of client and obtain the information of first object and the information of adduction relationship, and in browser, be shown to the user.
For the effect that reaches more directly perceived in client, makes things convenient for the user to check, usually client is showed with the form of the tree structure result to memory overflow.Particularly, client can generate tree structure according to first object that obtains and adduction relationship, and this tree structure is showed the user.Wherein, the root node of tree structure is the origin object in this adduction relationship, tree structure leaf node bottom is first object of memory overflow source correspondence, promptly represented above-mentioned adduction relationship by root node to the path of this leaf node, just cause memory overflow just because of this adduction relationship, therefore, can check the positioning result of memory overflow easily by the tree structure user.
The technical scheme that provides for the embodiment of the invention, not only comprise present embodiment, also comprise other all embodiment, the information of first object that the server end analysis obtains, be not limited to the essential information of this first object, can identify the information of this object as title, address etc., further, can also comprise the information that other is relevant with first object, the time that is cited as this first object, the number of times that is cited and when which time is cited, cause memory overflow or the like.The information of the adduction relationship that the server end analysis obtains, be not limited to the object that comprises in this adduction relationship essential information, quote the information that sequential scheduling can identify this adduction relationship, further, can also comprise relevant information of each object wherein or the like.The embodiment of the invention is not done concrete qualification to this.
The said method that present embodiment provides obtains memory overflow information by server end to dump file analysis, and when sending request under the B/S pattern, client sends analysis result to client, reached the purpose of long range positioning memory overflow, realized that use web mode is located and showing internal memory leaks the result.This method need not client and uses special-purpose instrument, and client uses the B/S mode to check the memory overflow result, need not rely on home environment, and is simple and convenient, easily operation.And, the result of memory overflow analysis need not progressively show but the disposable client that is presented at by different level, the user who need not client participates in too much, can navigate to source of leaks the user fast in the acceptable response time, the long-range location source of leaks of checking becomes and is easy to, can reach the effect of long-range quick location memory overflow, greatly improve the speed and the efficient of location.Come the current reading state that whether is in of identification server end by status indicator is set, make server end when reading state, refuse other request of client, to prevent because client is repeatedly asked the situation generation of the memory overflow information disorder that brings.
Embodiment 4
In order to realize the long range positioning memory overflow, referring to Fig. 4, present embodiment provides a kind of server end of locating memory overflow, comprising:
Analysis module 401, be used for dump file analysis is obtained memory overflow information, this memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, and the termination object of this adduction relationship is first object;
Receiver module 402 is used to receive the request of the location memory overflow that client sends under the B/S pattern;
Sending module 403, be used for after receiver module 402 is received request, the information of first object that analysis module 401 is obtained and the information of adduction relationship send to client, make client get access to first object and adduction relationship according to the information of receiving, and show first object and adduction relationship.
Wherein, sending module 403 can comprise:
Transmitting element, be used for after 402 of moulds of reception are received request, in the memory overflow information that analysis module 401 obtains, origin object from adduction relationship, information according to each object in the order of quoting reading and sending adduction relationship is successively given client, till the information of first object is sent completely, makes client get access to first object and adduction relationship, and show first object and adduction relationship according to the information of receiving.
In order to prevent to comprise at sending module 403 on the basis of above-mentioned transmitting element that owing to the memory overflow information disorder of repeatedly asking to bring further, sending module 403 can also comprise:
Identify unit, be used for beginning to read constantly at each object of adduction relationship, it is reading state that status indicator is set, make server end no longer other request of customer in response end under reading state, and the end of each object in adduction relationship is read constantly, it is non-reading state that status indicator is set, and makes other request that server end can the customer in response end under non-reading state.
The server end that present embodiment provides belongs to same design with method embodiment, and its specific implementation process sees method embodiment for details, repeats no more here.
Above-mentioned server end is by analyzing dump file, and sends analysis result to client when client is sent request under the B/S pattern, reached the purpose of long range positioning memory overflow, realized that use web mode is located and showing internal memory leaks the result.This method need not client and uses special-purpose instrument, uses the B/S mode to check the memory overflow result by client, need not rely on home environment, and is simple and convenient, operation easily.And, the result of memory overflow analysis need not progressively show but the disposable client that is presented at by different level, the user who need not client participates in too much, can navigate to source of leaks the user fast in the acceptable response time, the long-range location source of leaks of checking becomes and is easy to, can reach the effect of long-range quick location memory overflow, greatly improve the speed and the efficient of location.Come the current reading state that whether is in of identification server end by status indicator is set, make server end when reading state, refuse other request of client, to prevent because client is repeatedly asked the situation generation of the memory overflow information disorder that brings.
Embodiment 5
In order to realize the long range positioning memory overflow, referring to Fig. 5, present embodiment provides a kind of client of locating memory overflow, comprising:
Sending module 501 is used for sending to server end the request of location memory overflow under the B/S pattern;
Receiver module 502, be used for the memory overflow information that the reception server end returns, this memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, the termination object of this adduction relationship is first object, and this memory overflow information is to obtain after server end is analyzed dump file;
Processing module 503 is used for the information of first object that receives according to receiver module 502 and the information of adduction relationship, gets access to first object and adduction relationship, and shows first object and adduction relationship.
For the positioning result that visual pattern ground showing internal memory more leaks, processing module 503 can comprise:
Processing unit is used for the information of first object that receives according to receiver module 502 and the information of adduction relationship, gets access to first object and adduction relationship, generates tree structure according to first object and adduction relationship, and shows this tree structure.
The client that present embodiment provides belongs to same design with method embodiment, and its specific implementation process sees method embodiment for details, repeats no more here.
Above-mentioned client is by sending request to server end under the B/S pattern, and the memory overflow information sent according to result that dump file analysis is obtained of reception server end, get access to first object and the adduction relationship that causes memory overflow of memory overflow source correspondence, reached the purpose of long range positioning memory overflow, realized that use web mode is located and showing internal memory leaks the result.This method need not client and uses special-purpose instrument, uses the B/S mode to check the memory overflow result, need not rely on home environment, and is simple and convenient, operation easily.And, the result of memory overflow analysis need not progressively show but disposable showing by different level, need not the user participates in too much, can navigate to source of leaks the user fast in the acceptable response time, the long-range location source of leaks of checking becomes and is easy to, can reach the effect of long-range quick location memory overflow, greatly improve the speed and the efficient of location.
Embodiment 6
In order to realize the long range positioning memory overflow, referring to Fig. 6, present embodiment provides a kind of system of locating memory overflow, comprising: server end 601 and client 602;
Server end 601, be used for dump file analysis is obtained memory overflow information, this memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, and the termination object of this adduction relationship is first object; The request of the location memory overflow that reception client 602 is sent under the B/S pattern; The information of first object and the information of adduction relationship are sent to client 602;
Client 602 is used for sending to server end 601 request of location memory overflow under the B/S pattern; The memory overflow information that reception server end 601 returns according to the information of wherein first object and the information of adduction relationship, gets access to first object and adduction relationship, and shows first object and adduction relationship.
The system that present embodiment provides belongs to same design with method embodiment, and its specific implementation process sees method embodiment for details, and server end 601 is identical with server end among the embodiment 4, and the client of describing among client 602 and the embodiment 5 is identical, therefore, repeat no more here.
The said system that present embodiment provides obtains memory overflow information by server end to dump file analysis, and when sending request under the B/S pattern, client sends analysis result to client, reached the purpose of long range positioning memory overflow, realized that use web mode is located and showing internal memory leaks the result.This method need not client and uses special-purpose instrument, and client uses the B/S mode to check the memory overflow result, need not rely on home environment, and is simple and convenient, easily operation.And, the result of memory overflow analysis need not progressively show but the disposable client that is presented at by different level, the user who need not client participates in too much, can navigate to source of leaks the user fast in the acceptable response time, the long-range location source of leaks of checking becomes and is easy to, can reach the effect of long-range quick location memory overflow, greatly improve the speed and the efficient of location.By being set, status indicator comes the current reading state that whether is in of identification server end, make server end when reading state, refuse other Location Request of client, repeatedly ask the situation of the memory overflow information disorder that brings and take place owing to client preventing.
Need to prove at last, one of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (ROM) or stores memory body (RAM) etc. at random.
Each functional unit in the embodiment of the invention can be integrated in the processing module, also can be that the independent physics in each unit exists, and also can be integrated in the module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, also can adopt the form of software function module to realize.If described integrated module realizes with the form of software function module and during as independently production marketing or use, also can be stored in the computer read/write memory medium.The above-mentioned storage medium of mentioning can be a read-only memory, disk or CD etc.Above-mentioned each device or system can carry out the method among the correlation method embodiment.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (11)

1. a method of locating memory overflow is characterized in that, described method comprises:
Dump file analysis is obtained memory overflow information, and described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, and the termination object of described adduction relationship is described first object;
The request of the location memory overflow that the reception client is sent under browser and server B/S pattern;
The information of described first object and the information of adduction relationship are sent to described client, make described client get access to described first object and adduction relationship, and show described first object and adduction relationship according to the information of receiving.
2. method according to claim 1 is characterized in that, the information of described first object and the information of adduction relationship are sent to described client, specifically comprises:
In described memory overflow information,, give described client according to the information of each object in the described adduction relationship of the order of quoting reading and sending successively, till the information of described first object is sent completely from the origin object of described adduction relationship.
3. method according to claim 2 is characterized in that, described method also comprises:
The beginning of each object in described adduction relationship read constantly, and it is reading state that status indicator is set, and makes other request that no longer responds described client under reading state;
The end of each object in described adduction relationship is read constantly, and it is non-reading state that described status indicator is set, and makes other request that can respond described client under non-reading state.
4. a method of locating memory overflow is characterized in that, described method comprises:
Under browser and server B/S pattern, send the request of location memory overflow to server end;
Receive the memory overflow information that described server end returns, described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, the termination object of described adduction relationship is described first object, and described memory overflow information is to obtain after described server end is analyzed dump file;
According to the information of described first object that receives and the information of described adduction relationship, get access to described first object and adduction relationship, and show described first object and adduction relationship.
5. method according to claim 4, it is characterized in that the information of described first object that described basis receives and the information of described adduction relationship get access to described first object and adduction relationship, and show described first object and adduction relationship, specifically comprise:
According to the information of described first object that receives and the information of described adduction relationship, get access to described first object and adduction relationship, generate tree structure according to described first object and adduction relationship, and show described tree structure.
6. a server end of locating memory overflow is characterized in that, described server end comprises:
Analysis module, be used for dump file analysis is obtained memory overflow information, described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, and the termination object of described adduction relationship is described first object;
Receiver module is used to receive the request of the location memory overflow that client sends under browser and server B/S pattern;
Sending module, be used for after described receiver module is received described request, the information of described first object that described analysis module is obtained and the information of adduction relationship send to described client, make described client get access to described first object and adduction relationship, and show described first object and adduction relationship according to the information of receiving.
7. server end according to claim 6 is characterized in that, described sending module specifically comprises:
Transmitting element, be used for after described receiver module is received described request, in the described memory overflow information that described analysis module obtains, origin object from described adduction relationship, information according to each object in the described adduction relationship of the order of quoting reading and sending is successively given described client, till the information of described first object is sent completely, make described client get access to described first object and adduction relationship, and show described first object and adduction relationship according to the information of receiving.
8. server end according to claim 7 is characterized in that, described sending module also comprises:
Identify unit, be used for beginning to read constantly at each object of described adduction relationship, it is reading state that status indicator is set, make described server end under reading state, no longer respond other request of described client, and the end of each object in described adduction relationship is read constantly, it is non-reading state that described status indicator is set, and makes described server end can respond other request of described client under non-reading state.
9. a client of locating memory overflow is characterized in that, described client comprises:
Sending module is used for sending to server end the request of location memory overflow under browser and server B/S pattern;
Receiver module, be used to receive the memory overflow information that described server end returns, described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, the termination object of described adduction relationship is described first object, and described memory overflow information is to obtain after described server end is analyzed dump file;
Processing module is used for the information of described first object that receives according to described receiver module and the information of described adduction relationship, gets access to described first object and adduction relationship, and shows described first object and adduction relationship.
10. client according to claim 9 is characterized in that, described processing module specifically comprises:
Processing unit, be used for the information of described first object that receives according to described receiver module and the information of described adduction relationship, get access to described first object and adduction relationship, generate tree structure according to described first object and adduction relationship, and show described tree structure.
11. a system of locating memory overflow is characterized in that, described system comprises: server end and client;
Described server end, be used for dump file analysis is obtained memory overflow information, described memory overflow information comprises the information of first object of memory overflow source correspondence, and the information that causes the adduction relationship of memory overflow, and the termination object of described adduction relationship is described first object; Receive the request of the location memory overflow that described client sends under browser and server B/S pattern; The information of described first object and the information of adduction relationship are sent to described client;
Described client is used for sending to described server end the request of location memory overflow under the B/S pattern; Receive the described memory overflow information that described server end returns,, get access to described first object and adduction relationship, and show described first object and adduction relationship according to the information of wherein described first object and the information of described adduction relationship.
CN201010111619.1A 2010-02-09 2010-02-09 Memory leak positioning method, server, client and system Active CN102148844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010111619.1A CN102148844B (en) 2010-02-09 2010-02-09 Memory leak positioning method, server, client and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010111619.1A CN102148844B (en) 2010-02-09 2010-02-09 Memory leak positioning method, server, client and system

Publications (2)

Publication Number Publication Date
CN102148844A true CN102148844A (en) 2011-08-10
CN102148844B CN102148844B (en) 2014-08-27

Family

ID=44422837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010111619.1A Active CN102148844B (en) 2010-02-09 2010-02-09 Memory leak positioning method, server, client and system

Country Status (1)

Country Link
CN (1) CN102148844B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103672989A (en) * 2013-11-28 2014-03-26 宋晓燕 Micro-wave oven capable of quickly cooling cooked food
CN103714004A (en) * 2014-01-02 2014-04-09 金蝶软件(中国)有限公司 JVM online memory leak analysis method and system
WO2015062309A1 (en) * 2013-11-04 2015-05-07 Tencent Technology (Shenzhen) Company Limited Protocol request processing method and device using the same
CN105260294A (en) * 2015-11-16 2016-01-20 曙光信息产业(北京)有限公司 Monitoring method and device for memory occupied by application program
CN106560796A (en) * 2015-12-31 2017-04-12 哈尔滨安天科技股份有限公司 Early-warning method and system for internal memory stack abnormity of intranet terminal application program
CN106776342A (en) * 2017-01-03 2017-05-31 百度在线网络技术(北京)有限公司 The method and apparatus that a kind of memory object to Mobile solution is analyzed
CN106933733A (en) * 2015-12-30 2017-07-07 华为技术有限公司 A kind of method and apparatus for determining RAM leakage position
CN107766155A (en) * 2017-10-23 2018-03-06 北京京东尚科信息技术有限公司 Object processing method and system
CN109032827A (en) * 2018-07-03 2018-12-18 郑州云海信息技术有限公司 It is a kind of to track the test macro and method for leading to memory overflow exception
CN111400185A (en) * 2020-03-18 2020-07-10 北京字节跳动网络技术有限公司 Memory leak processing method and device, readable medium and electronic equipment
CN112711629A (en) * 2020-12-30 2021-04-27 浙江中控技术股份有限公司 Data and associated data import and export method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1770048A (en) * 2005-09-29 2006-05-10 上海电器科学研究所(集团)有限公司 Embedded web page server
CN1980237A (en) * 2005-12-09 2007-06-13 北京瑞星国际软件有限公司 Method for apparatus for identifying module of accessing network
CN101017458A (en) * 2007-03-02 2007-08-15 北京邮电大学 Software safety code analyzer based on static analysis of source code and testing method therefor
CN101593152A (en) * 2009-06-25 2009-12-02 青岛海信移动通信技术股份有限公司 A kind of portable terminal memory leakage detecting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1770048A (en) * 2005-09-29 2006-05-10 上海电器科学研究所(集团)有限公司 Embedded web page server
CN1980237A (en) * 2005-12-09 2007-06-13 北京瑞星国际软件有限公司 Method for apparatus for identifying module of accessing network
CN101017458A (en) * 2007-03-02 2007-08-15 北京邮电大学 Software safety code analyzer based on static analysis of source code and testing method therefor
CN101593152A (en) * 2009-06-25 2009-12-02 青岛海信移动通信技术股份有限公司 A kind of portable terminal memory leakage detecting method and device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10009444B2 (en) 2013-11-04 2018-06-26 Tencent Technology (Shenzhen) Company Limited Protocol request processing method and device using the same
WO2015062309A1 (en) * 2013-11-04 2015-05-07 Tencent Technology (Shenzhen) Company Limited Protocol request processing method and device using the same
CN104618308A (en) * 2013-11-04 2015-05-13 腾讯科技(武汉)有限公司 Protocol request processing method and device
TWI555366B (en) * 2013-11-04 2016-10-21 騰訊科技(深圳)有限公司 A protocol request processing method
CN104618308B (en) * 2013-11-04 2019-09-13 腾讯科技(武汉)有限公司 Agreement request processing method and processing device
CN103672989A (en) * 2013-11-28 2014-03-26 宋晓燕 Micro-wave oven capable of quickly cooling cooked food
CN103714004A (en) * 2014-01-02 2014-04-09 金蝶软件(中国)有限公司 JVM online memory leak analysis method and system
CN105260294A (en) * 2015-11-16 2016-01-20 曙光信息产业(北京)有限公司 Monitoring method and device for memory occupied by application program
CN106933733A (en) * 2015-12-30 2017-07-07 华为技术有限公司 A kind of method and apparatus for determining RAM leakage position
CN106933733B (en) * 2015-12-30 2020-03-10 华为技术有限公司 Method and device for determining memory leak position
CN106560796A (en) * 2015-12-31 2017-04-12 哈尔滨安天科技股份有限公司 Early-warning method and system for internal memory stack abnormity of intranet terminal application program
CN106776342A (en) * 2017-01-03 2017-05-31 百度在线网络技术(北京)有限公司 The method and apparatus that a kind of memory object to Mobile solution is analyzed
CN107766155A (en) * 2017-10-23 2018-03-06 北京京东尚科信息技术有限公司 Object processing method and system
CN109032827A (en) * 2018-07-03 2018-12-18 郑州云海信息技术有限公司 It is a kind of to track the test macro and method for leading to memory overflow exception
CN111400185A (en) * 2020-03-18 2020-07-10 北京字节跳动网络技术有限公司 Memory leak processing method and device, readable medium and electronic equipment
CN112711629A (en) * 2020-12-30 2021-04-27 浙江中控技术股份有限公司 Data and associated data import and export method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN102148844B (en) 2014-08-27

Similar Documents

Publication Publication Date Title
CN102148844B (en) Memory leak positioning method, server, client and system
CN106528432B (en) The construction method and device of test scene data bury a test method
CN107133174A (en) Test case code automatically generating device and method
CN106126410B (en) The reminding method and device of code conflicts
CN107562620A (en) One kind buries an automatic setting method and device
CN109302522A (en) Test method, device and computer system and medium
CN103970614B (en) A kind of service test method and device
CN104951399A (en) Software test system and method
CN103246606B (en) The performance test methods of ESB platform and system
CN104486422A (en) Information push method and device
CN107203470B (en) Page adjustment method and device
CN109308254A (en) A kind of test method, device and test equipment
CN103177096B (en) Page elements localization method and equipment based on text attribute
CN105022694A (en) Test case generation method and system for mobile terminal test
CN110134869A (en) A kind of information-pushing method, device, equipment and storage medium
CN107065663A (en) A kind of unit malfunction test method and its mobile terminal, unit malfunction test system
CN109656797A (en) The correlating method and device of daily record data
CN109815120A (en) Test method, device, computer equipment and the storage medium of application
CN107766307A (en) A kind of method and apparatus of Form Element linkage
CN103746904A (en) Information interaction method and device
CN109886015A (en) The detection method and device of the installation kit of application program
CN102684925A (en) Method and device for acquiring internet access source information
CN107204897A (en) The fault detection method and system of network link
CN101582050B (en) Bug prompt method in software test and device
CN110134607A (en) A kind of app automated testing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: South South technology twelve road 518057 in Guangdong province Shenzhen City Guangdong streets Nanshan District high tech Industrial Park, No. 2, Kingdee Software Park building A floor 2 South Block

Patentee after: Shenzhen Kingdee middleware Limited by Share Ltd.

Address before: 518057 Guangdong City, Nanshan District province high tech Zone in the middle of the industrial zone of the sparrow tower M-6 building, floor 1, area 3, second, 4

Patentee before: Shenzhen Kingdee Middleware Co., Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: South South technology twelve road 518057 in Guangdong province Shenzhen City Guangdong streets Nanshan District high tech Industrial Park, No. 2, Kingdee Software Park building A floor 2 South Block

Patentee after: Shenzhen Kingdee tianyanyun computing Co., Ltd.

Address before: 518057 south block, 2f, building a, Kingdee Software Park, No. 2, Keji South 12th Road, South District, high tech Industrial Park, Yuehai street, Nanshan District, Shenzhen

Patentee before: Shenzhen Kingdee middleware Limited by Share Ltd.