Community
Participate
Working Groups
This is a follow up of bug 192300: As captured and modified from bug 192300: Launch the attached application from a command line in profiling mode using the -XrunpiAgent command. Create an attach configuration selecting BOTH Memory and Execution Analysis, add the following filter "java.awt.Button INCLUDE" and "* EXLUDE" and attach to the application. Open the Memory Satistics view. Click twice on the Add button of the test application, observe that the view displays 4 instances of the java.awt.Button class. Pause monitoring and click two times more on the Add button, refresh the view, no changes are displayed which is correct. Resume monitoring and click again two times on the Add button and refresh the view, observe that now the number of Button instances is 8 instead of 6.The same behaviour is observed when profiling to file, instances that are created while in pause mode are added to the total number of instances. For this use case : select BOTH PI memory and execution analysis, <option key="STACK_INFORMATION" value="normal"/> is sent to agent correctly, but it's treated as <option key="STACK_INFORMATION" value="contiguous"/>
Updated sizing.
Testing with TPTP 4.3.1 and AC 4.3.1 I saw the same problem
I think this might be related to aggregation. Adding Ali to the cc: list. What I have noticed is that when I attach to the running PerformanceExample application under enabled mode, I immediately get 2 instances of Button. This is happening when both execution stat and memory analysis are chosen. When only memory analysis is selected, I guess aggregation is not kicked in so the correct result is shown.
Update priority to P2 to flag that this is at risk for 4.4.0.1 due to resources not being available to work on this.
Samson, what is the outlook for this defect? We need to shut down 4.4.0.1 and htis appears to be an important defect to clear.
Reply comment #3: for Execution Time Analysis, if I select the "show execution flow graphical details" option instead of the default one (to disable the aggregation), I still see the same problem. So I guess the problem lies somewhere else reply comment #5: I am looking at it today.
4.4.0.1 has been closed down.
Created attachment 77401 [details] Test case showing the correct behaviour
The attached test case will show that the piAgent is working as designed. The test program "TestObject" will create 10 instances of "TestObject2". Try running it with "-XrunpiAgent" and attach to the agent. The instances created when monitoring is paused will not be shown in the memory stat views. The reason is that none of the "TestObject2" method is being called. After resuming from the paused state, the test program "TestObject" will go on creating new instances of the "TestObject2" class and never revisit the previously created instances. Therefore the piAgent does not have to process the missing stack entries. For the original "PerformanceExample" test case, apparantly the Button instances created during the pause are being "revisited" after resume. This may be something like widget refresh caused by a change in the UI layout. Since the execution histroies are being collected as well, any method entry/exit calls which does not have a corresponding object associated will be recreated by the piAgent's "processMissingStackEntries()" function. This will try to find the object reference and if it does not exist in the current hash (due to stop monitoring) the piAgent will recreate the object and therefore reappear in the memory stat view. This can explain why it does not happen if only memory stat is collected. I will mark this as "working for me".
Adjust sizing.
CLOSE BUG