This document is applied after binary 2014-07-18
Method profiling for .NET has been developed based on existing profiling function for the JAVA platform. Thus, many profiling options available under JAVA profiling function may be used for .NET as well. The following are commonly used profiling options which are available in both JAVA and .NET
Please note that not all profiling options for JAVA can be used for .NET because of the structural difference in the two coding languages.
- .NET profiling does not support "profile_call" of JAVA version.
- .NET profiling requires process restart. 2 options available (iisreset or recycle).
- .NET profiling does not support "enable_hooking_boot" of JAVA version. However, .NET provides another option (Please refer to the System Files Profiling section of this article)
Three Stages of Profiling Method
After adding or changing the profiling option, the application process must be restarted in order for the change(s) to take effect.
See below figure for an example. Class "Jennifer40.WebSiteTest.About" is set as profiling target class. When this class is selected by checking the checkbox and click "Apply" button, this class is displayed with "[RDY]" status at the right column.
"[RDY]" status means that this class is ready for profiling, but profiling has not yet begun. Also, this class may remain in "[RDY]" status even after restarting the application process because it has not been initialized by application call.
A class status changes to "[HKD]" when the method profiling is successfully executed. This means that method profiling has been inserted in the target class and JENNIFER has begun collecting profiling data.
Note that when profiling status becomes "[HKD]", X-View may not display any profiling data. In this case, check if a class name has been successfully defined under "[Real-time Monitoring] / [Profile]" menu.
Set 'profile_default_on' option to true to ensure that profiling function is active. Once "[HKD]" status become "[PRO]", those classes profile will be displayed in X-View. The following table shows Three Stages of Method Profiling process
||Target class for profiling has been configured
||.NET profiling code is inserted in the target class.
||Profiling data is available
[execution filename].exe.ini Configuration File
JENNIFER for JAVA stores its configuration settings in [Redefine LWST]. However, .NET cannot store its configuration settings in such a way because .NET profiling requires EXE process restart. Thus, JENNIFER .NET uses a configuration file to store configuration settings instead. The file name may look like "[execution filename].exe.ini".
[execution filename].exe.ini file includes all profiling options for JENNIFER .NET. When a user sets profile-related options through JENNIFER admin console's conf file, all changes to options are saved into [execution filename].exe.ini file automatically.
[Caution] Directly modifying the .conf file is not recommended. To make any changes for profiling option, modify [execution filename].exe.ini instead. Profiling options are saved automatically only when it is added or changed through JENNIFER admin console
For Example, 'Jennifer40.WebSiteTest.Account.Register' class has been added to the profiling option as seen in the following figure.
After changes is added and the [Update] button is clicked, this option is automatically saved in the [execute filename].exe.ini file (it is not saved in ".conf" file) . Assuming that profiling option is changed for "w3wp.exe", modifying settings is saved in [JENNIFER_INSTALLED_FOLDER/conf/w3wp.exe.ini] file
JENNIFER admin console display profiling option settings from [exeute filename].exe.ini file and it may also display additional profiling option if found in ".conf" file as well.
All .exe process stores values for profiling options. Therefore, if an .exe process has one or more sub-agent, any changes to an agent will also be applied to all subagents as well.
System Files Profiling
JENNIFER .NET agent does not allow to profiling of Microsoft developed system DLL file in principle. However, when profiling system DLL file is required, "System Files Profiling" option may be used by configuring [systemprofile] settings in [JENNIFER_INSTALLATION_FOLDER/profile.ini].
For example, to profile "System.Xml.XmlDocument" defined in "System.Xml.dll", the following settings should be used
The above example states that all methods starting with "c" character are profiled.
To profile just one method, set a specific method name as follows
After settings system profile option, restart the process for the changes to take effect.
[Caution] systemprofile can not be used for mscorlib.dll and system.configuration.dll.
"Restart" button in Redefine LWST
In JENNIFER .NET Redefine LWST menu, "Restart" button is located at the bottom-right corner of the window.
Users may restart the application process for the registered class directly from JENNIFER's Redefine LWST menu. To do so, select the target class in the list and then press the "Restart" button to restart application process. If there are many classes, the user may search class by name using the search function at the top of the screen. If a class name is not found in the list, perform a manual restart of the application process.
Loaded Classes List
Loaded class list can be found under [Problem Determination -> Utilities] menu. Loaded Classes lists classes configuration under [systemprofile] (Refer to System Files Profiling). Classes of such as "mscorelib.dll" and "system.configuration.dll" are excluded from the loaded classes list.
Tips for Method Profiling
- When adding new method profiling and options, testing the setting in a test envrionment first is strongly recommended.
- Profiling "system.servicemodel.dll" file developed by Microsoft may cause un-wanted side effect to WCF service. Currently, we are working with Microsoft to get support/resolution for this issue.
- If a target class has complex branch statement, some method may be excluded to prevent poor performance. In such case, view excluded methods in profiling log with "RWR_JUMPFAILED" in the [JENNIFER_INSTALLATION_FOLDER/log/profiler].