发明授权
US06742178B1 System and method for instrumenting application class files with correlation information to the instrumentation
失效
用于将具有相关信息的应用程序类文件检测到仪器的系统和方法
- 专利标题: System and method for instrumenting application class files with correlation information to the instrumentation
- 专利标题(中): 用于将具有相关信息的应用程序类文件检测到仪器的系统和方法
-
申请号: US09620729申请日: 2000-07-20
-
公开(公告)号: US06742178B1公开(公告)日: 2004-05-25
- 发明人: Robert Francis Berry , Weiming Gu , Riaz Y. Hussain , Frank Eliot Levine , Wai Yee Peter Wong
- 申请人: Robert Francis Berry , Weiming Gu , Riaz Y. Hussain , Frank Eliot Levine , Wai Yee Peter Wong
- 主分类号: G06F944
- IPC分类号: G06F944
摘要:
The present invention is directed to a system and method for modifying a class file for the purpose of instrumenting without requiring separate files to correlate the instrumentation. A class file is instrumented with hooks. Each hook is injected in a method at a critical point in the code for tracking path flow, such as where the method will be entered or exited. Each hook includes an identifier to identify the method in which it is injected. Rather than using the method's name, hooks use unique major and minor codes to identify the method. Static initializers are declared for the class to output other hooks identifying the methods being instrumented. When a class is loaded, the static initializers are executed and hooks identifying the method name and the major and minor codes for each instrumented method are output to, for instance, a trace record. Then, when a method is entered or exited, the hooks identifying the entry or exit are also outputted to a trace record. When postprocessing the trace records, class and instrumentation correlation information is available for merging from trace records in the trace stream.
信息查询