Methods and Systems of Distributed Tracing
US-2015370693-A1 · Dec 24, 2015 · US
US2017168886A1 · US · A1
| Field | Value |
|---|---|
| Publication number | US-2017168886-A1 |
| Application number | US-201715441837-A |
| Country | US |
| Kind code | A1 |
| Filing date | Feb 24, 2017 |
| Priority date | Aug 26, 2014 |
| Publication date | Jun 15, 2017 |
| Grant date | — |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
Embodiments of the present disclosure disclose a resource leak detection method, apparatus, and system that includes obtaining a target resource called when target code of a program runs, where the target code is partial code in program code, determining a first storage resource amount occupied by the target resource, determining whether the first storage resource amount occupied by the target resource satisfies a first preset condition, and if the first storage resource amount occupied by the target resource satisfies the first preset condition, determining a storage location of the target code as a resource leak location. In the embodiments of the present disclosure, the target code of the program can be tracked, and further, by means of detection, the storage location of the target code can be determined as the resource leak location.
Opening claim text (preview).
What is claimed is: 1 . A resource leak detection method, comprising: obtaining a target resource called when target code of a program runs, wherein the target code is partial code in a program code; determining a first storage resource amount occupied by the target resource; determining whether the first storage resource amount occupied by the target resource satisfies a first preset condition, wherein the first preset condition is set such that the first storage resource amount occupied by the target resource constitutes a resource leak; and determining a storage location of the target code as a resource leak location when the first storage resource amount occupied by the target resource satisfies the first preset condition. 2 . The method according to claim 1 , wherein the target resource comprises at least two target sub-resources, wherein the target sub-resources are partial resources that are called in a process of running the target code and that are in the target resource, and wherein the method further comprises: obtaining a calling path on which the target sub-resource is called when the target code runs; determining a proportion value that the target sub-resource accounts for the first storage resource amount; determining whether the proportion value that the target sub-resource accounts for in the first storage resource amount satisfies a second preset condition, wherein the second preset condition is set such that the proportion value that the target sub-resource accounts for in the first storage resource amount constitutes a resource leak; and determining the calling path, on which the target sub-resource is called, as a resource leak calling path when the proportion value that the target sub-resource accounts for in the first storage resource amount satisfies the second preset condition. 3 . The method according to claim 1 , wherein the first preset condition comprises a first preset threshold or a first preset increase rule, wherein the first preset threshold is set such that the first storage resource amount is greater than a minimum value of the first storage resource amount, which constitutes a resource leak, wherein the first preset increase rule is set such that an increase trend change of the first storage resource amount in a resource period constitutes a resource leak, wherein the resource period is a life cycle in which the target resource occupies storage space, and wherein determining whether the first storage resource amount occupied by the target resource satisfies a first preset condition comprises: determining whether the first storage resource amount occupied by the target resource is greater than the first preset threshold; and determining that the first storage resource amount occupied by the target resource satisfies the first preset condition when the first storage resource amount occupied by the target resource is greater than the first preset threshold. or 4 . The method according to claim 1 , wherein the first preset condition comprises a first preset threshold or a first preset increase rule, wherein the first preset threshold is set such that the first storage resource amount is greater than a minimum value of the first storage resource amount, which constitutes a resource leak, wherein the first preset increase rule is set such that an increase trend change of the first storage resource amount in a resource period constitutes a resource leak, wherein the resource period is a life cycle in which the target resource occupies storage space, and wherein determining whether the first storage resource amount occupied by the target resource satisfies a first preset condition comprises: determining whether the first storage resource amount occupied by the target resource satisfies the first preset increase rule in the resource period; and determining that the first storage resource amount occupied by the target resource satisfies the first preset condition when the first storage resource amount occupied by the target resource satisfies the first preset increase rule in the resource period. 5 . The method according to claim 2 , wherein the second preset condition comprises a second preset threshold or a second preset increase rule, wherein the second preset threshold is set such that a proportion value of the first storage resource amount is greater than a minimum value of the proportion value that the target sub-resource accounts for in the first storage resource amount, which constitutes a resource leak, wherein the second preset increase rule is set such that an increase trend change of the proportion value that the target sub-resource accounts for in the first storage resource amount in a resource period constitutes a resource leak, wherein the resource period is a life cycle in which the target resource occupies storage space, and wherein determining whether the proportion value that the target sub-resource accounts for in the first storage resource amount satisfies a second preset condition comprises: determining whether the proportion value that the target sub-resource accounts for in the first storage resource amount is greater than the second preset threshold; and determining that the proportion value that the target sub-resource accounts for in the first storage resource amount satisfies the second preset condition if the proportion value that the target sub-resource accounts for in the first storage resource amount is greater than the second preset threshold. 6 . The method according to claim 2 , wherein the second preset condition comprises a second preset threshold or a second preset increase rule, wherein the second preset threshold is set such that a proportion value of the first storage resource amount is greater than a minimum value of the proportion value that the target sub-resource accounts for in the first storage resource amount, which constitutes a resource leak, wherein the second preset increase rule is set such that an increase trend change of the proportion value that the target sub-resource accounts for in the first storage resource amount in a resource period constitutes a resource leak, wherein the resource period is a life cycle in which the target resource occupies storage space, and wherein determining whether the proportion value that the target sub-resource accounts for in the first storage resource amount satisfies a second preset condition comprises: determining whether the proportion value that the target sub-resource accounts for in the first storage resource amount satisfies the second preset increase rule in the resource period; and determining that the proportion value that the target sub-resource accounts for in the first storage resource amount satisfies the second preset condition when the proportion value that the target sub-resource accounts for in the first storage resource amount satisfies the second preset increase rule in the resource period. 7 . The method according to claim 1 , wherein the storage location of the target code comprises at least two storage location units, wherein each of the storage location units stores sub-code, wherein the sub-code stored in the at least two storage location units constitutes the target code, and wherein the method further comprises: obtaining a target sub-resource called when the sub-code stored in the storage location unit runs, wherein target sub-resources called when the sub-code stored in the at least two storage location units runs constitute the target resource; determining a proportion value that the target sub-resource accounts for in the first storage resource amount, wherein the target sub-resource is called when the sub-code stored in the storage location unit runs; determining whether the proportion value satisfies a third
by runtime analysis (performance monitoring G06F11/3466) · CPC title
Prevention of errors by analysis, debugging or testing of software · CPC title
where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00) · CPC title
in a memory management context, e.g. virtual memory or cache management (memory management G06F12/00; testing of static memory units G11C29/00) · CPC title
Root cause analysis, i.e. error or fault diagnosis (in a hardware test environment G06F11/22; in a software test environment G06F11/36) · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.