The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further purposes and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying figures, wherein:
With reference to
In the presently preferred embodiment, Java 2 Platform Enterprise Edition (J2EE) is used on computer system 100. J2EE is a platform-independent, JAVA-centric environment from Sun Microsystems for developing, building and deploying Web-based enterprise applications online. The J2EE platform consists of a set of services, APIs, and protocols that provide the functionality for developing multitiered, Web-based applications. At the client level, J2EE supports pure HTML, as well as Java applets or applications. Enterprise JavaBeans (EJBs) provide another layer where the platform's logic is stored. Within computer system 100, Web server 106 is configured to communicate over the Internet, as well as within the intranet of system 100; application server 108 is only connected to communicate within the intranet, but can access application database 112. In addition to other programs and processes that exist on these servers, each of server 106, 108 contains a copy of Java Virtual Machine (JVM) 114 and monitoring program 116, which will be discussed further below. One of ordinary skill in the art will recognize that many other configurations are possible in the disclosed intranet. For example, the web server and the application server can be on a single machine. Conversely, there may be a number of both web servers and application servers; there may also be separate database servers if the situation required it.
Referring to
Peripheral component interconnect (PCI) bus bridge 214 connected to I/O bus 212 provides an interface to PCI local bus 216. A number of modems may be connected to PCI local bus 216. Typical PCI bus implementations will support four PCI expansion slots or add-in connectors. Communications links to users 104 in
Additional PCI bus bridges 222 and 224 provide interfaces for additional PCI local buses 226 and 228, from which additional modems or network adapters may be supported. In this manner, data processing system 200 allows connections to multiple network computers. A memory-mapped graphics adapter 230 and hard disk 232 may also be connected to I/O bus 212 as depicted, either directly or indirectly.
Those of ordinary skill in the art will appreciate that the hardware depicted in
With reference to
The process proceeds to step 408, which illustrates management application 340 determining if the name of the currently-examined method include naming conventions characteristic of unimportant probe locations for the purposes of measuring performance data. In a preferred embodiment of the present invention, management application 340 dynamically detects certain characteristics of the target method before inserting instrumentation code. One preferred type of unimportant probe locations is know as the getter/setter method (also known as accessor/mutator methods)/ These accessor/mutator methods are commonly utilized to provide access to information encapsulated in an object.
Most getter/setter methods follow common naming conventions utilized by most Java programmers. These method names often begin with “get”, “is”, or “has” for accessor methods, and “set” for mutator methods. The values that these methods manipulate are referred to as “properties”, which are often private object level variables. For example, an object that has a private property named “customerName” could have a set of accessor/mutator methods correspondingly named “setCustomerName” and “getCustomerName”. By convention, these methods would be only responsible for getting and setting values of the “customerName” variable.
At the time when management application 340 is examining a probe location, these method names can be examined and compared against the object fields. If a method name is found that conforms to this design patter (e.g., the method name starts with “get”, “is”, “has” or “set”, and there exists an object variable with the same name as the rest of the method name), then the method is deemed unimportant and will not be instrumented by management application 340. Those with skill in the art will appreciate that the present invention is not limited to identifying getter/setter methods or the Java language, but is applicable to any identification of unimportant methods utilizing name patterns.
If the name of the examined method includes naming conventions characteristic of unimportant probe locations, the process continues to step 412. If the name of the examined method does not include naming conventions characteristic of unimportant probe locations, the process continues to step 410, which depicts management application 340 inserting a monitoring probe (e.g., probes 338) into the method's byte code. The process proceeds to step 412, which illustrates management application 340 examining the next class/method in application 310. The process returns to step 408 and proceeds in an iterative fashion.
As discussed, the present invention includes a method, system, and computer-usable medium for determining unimportant probe locations by examination of byte code to identify method by name pattern. In a preferred embodiment of the present invention, a first candidate location is identified in byte code to instrument with a monitoring probe. The first candidate location is screen according to a list of ineligible method names and/or property names. Responsive to a match with the list, the first candidate location is eliminated as a byte code location to instrument. It should be understood that at least some aspects of the present invention may alternatively be implemented in a computer-usable medium that contains a program product. Programs defining functions in the present invention can be delivered to a data storage system or a computer system via a variety of signal-bearing media, which include, without limitation, non-writable storage media (e.g., CD-ROM), writable storage media (e.g., hard disk drive, read/write CD-ROM, optical media), system memory such as, but not limited to Random Access Memory (RAM), and communication media, such as computer and telephone networks, including Ethernet, the Internet, wireless networks, and like network systems. It should be understood, therefore, that such signal-bearing media when carrying or encoding computer readable instructions that direct method functions in the present invention represent alternative embodiments of the present invention. Further, it is understood that the present invention may be implemented by as a system having means in the form of hardware, software, or a combination of software and hardware as described herein or their equivalent.
While the present invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention. Furthermore, as utilized in the specification and the appended claims, the term “computer” or “system” or “computer system” or “computing device” includes any data processing system including, but not limited to, personal computers, servers, workstations, network computers, main frame computers, routers, switches, personal digital assistants (PDAs), telephones, and any other system capable of processing, transmitting, receiving, capturing, and/or storing data.
The present application is related to the following co-pending U.S. Patent Applications: U.S. patent application Ser. No. 10/809,580 (Docket No. AUS920040049US1) filed on Mar. 25, 2004; and U.S. patent application Ser. No. 10/971,473 (Docket No. AUS920040382US1) filed on Oct. 22, 2004. The above-mentioned patent applications are assigned to the assignee of the present invention and are incorporated herein by reference in their entirety.