Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 208645

Summary: Nondeterministic trace file import
Product: z_Archived Reporter: Chris Elford <chris.l.elford>
Component: TPTPAssignee: Alexander N. Alexeev <analexee>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: analexee, asaf.yaffe, mikhail.sennikovskiy
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460
Attachments:
Description Flags
big trace file that exhibits the import determinism problem
none
Proposed fix for the problem none

Description Chris Elford CLA 2007-11-02 21:20:11 EDT
Created attachment 82021 [details]
big trace file that exhibits the import determinism problem

Build ID: 4.4.0.3

Steps To Reproduce:
1. Import attached trace file (full details)
2. Open in executionstatistics and go to executionstatistics tab
3. view by methods, sort by descending method call count
4. note number of times arraycopy is called (should be about #8
5. delete and remove from filesystem
6. goto step 1

Note that I did it 6 times and got six different call counts for the method arraycopy varying from 289k to 816k.


More information:
I'm pulling my hair out here.  We are trying to get good data for AsiaSummit presentation on using TPTP to optimize Harmony and are running into serious problems...  

Nondeterministic file import is pretty serious...

Note I created a standalone "C" program that reads thru the aggregated xml trace file and dumps what i believe to be the "right" value...  It says that arraycopy is called 160k times...

Help!
Comment 1 Chris Elford CLA 2007-11-05 21:08:42 EST
note that this was with sun 1.5.0_9 on x86 windows.
Comment 2 Alexander N. Alexeev CLA 2007-11-08 04:19:26 EST
There is a workaround,
you can press "refresh" button, after required view for imported trace is loaded. 

Importing of trace file to Eclipse workbench isn't part of JVM TI agent, so I suggest to change component to "Platform.Model".  
Comment 3 Guru Nagarajan CLA 2007-11-13 13:36:37 EST
I am not sure if this resolved in the patch that Alex provided.
Comment 4 Chris Elford CLA 2007-11-13 14:34:56 EST
Alex reports that the patch plus the workaround to refresh after loading the file makes it work.  There is still a Platform.model problem (as Alex mentions) that needs to be fixed.  I would argue that one should not have to refresh after loading a file.
Comment 5 Paul Slauenwhite CLA 2007-12-19 07:45:45 EST
If this Bugzilla is planed to be completed in 4.5, please add the plan keyword.  Otherwise, please target to future.

In addition, if this Bugzilla is committed to be completed in 4.5, please change the priority to P1.
Comment 6 Mikhail Sennikovsky CLA 2008-01-14 11:01:13 EST
Created attachment 86839 [details]
Proposed fix for the problem

Attached is the proposed fix for the problem.

The root cause of the problem is that the snapshots do not get updated properly after the trace is loaded:

The org.eclipse.hyades.trace.internal.ui.PDProjectExplorer.RefreshUI thread periodically checks the TRCAgentProxy's "collectionData" state and if true initiates a refresh. The problem is that the "collectionData" gets set to false once the trace data collection is completed, so the data collected in the period between the snapshots were last updated and "collectionData" is set to false does not get reflected in the snapshots.

The proposed fix fires a REFRESH_VIEW event on the trace collection complete thus making the snapshots be updated.
Comment 7 Alexander N. Alexeev CLA 2008-01-28 11:41:34 EST
proposed patch committed into HEAD
Comment 8 Alexander N. Alexeev CLA 2008-01-30 07:06:11 EST
Resolving as fixed
Comment 9 Paul Slauenwhite CLA 2009-06-30 13:28:03 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 10 Paul Slauenwhite CLA 2009-06-30 14:00:37 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.