Selective profiling of program code executing in a runtime environment
AssigneeInternational Business Machines Corporation
InventorsSteven Branda, John Stecher
Life of this patent
Estimating the term…
Abstract
An apparatus, program product and method associate a unique key with routines in an application to enable a profiler to ascertain whether to collect profile information for a routine during its execution. A key may be generated, for example, during deployment or installation of an application in an application server or other runtime environment, and subsequently associated with the routines in the application, e.g., by storing the key in the class and/or library files for the application. By doing so, each application in a runtime environment may be uniquely identified by a profiler during execution, such that profile information will only be collected for those applications for which profiling has been enabled.
Claims25
A method of collecting profile information for a JAVA application running in a J2EE application server, the method comprising:
- for each of a plurality of JAVA applications, generating a unique key therefor and associating the unique key with each class therein;
- receiving user input to enable profile information collection for a first JAVA application among the plurality of JAVA applications;
- and
- during execution of the first JAVA application in the J2EE server:
- collecting profile information for a first routine associated with the first JAVA application in response to determining that the first routine is associated with a first class having a key associated with the first JAVA application;
- and
- executing a second routine associated with a second JAVA application without collecting profile information therefor in response to determining that the second routine is associated with a second class having a key associated with a second JAVA application for which profile information collection is not enabled.
A method of collecting profile information in a runtime environment, the method comprising, in response to calling a routine in the runtime environment:
- accessing a key associated with the routine to determine whether the routine is in an application for which profiling has been enabled, wherein the key is uniquely associated with an application;
- and
- collecting profile information for the routine only if the routine is associated with an application for which profiling has been enabled.
An apparatus, comprising:
- a processor;
- and
- program code configured to be executed by the processor to collect collecting profile information in a runtime environment by, in response to calling a routine in the runtime environment, accessing a key associated with the routine to determine whether the routine is in an application for which profiling has been enabled, wherein the key is uniquely associated with an application, and collecting profile information for the routine only if the routine is associated with an application for which profiling has been enabled.
A program product, comprising:
- program code configured to collect collecting profile information in a runtime environment by, in response to calling a routine in the runtime environment, accessing a key associated with the routine to determine whether the routine is in an application for which profiling has been enabled, wherein the key is uniquely associated with an application, and collecting profile information for the routine only if the routine is associated with an application for which profiling has been enabled;
- and
- a computer readable medium bearing the program code.
Dependencies are inferred from the claim text.