I was halfway of changing my code to print a Log message each time I enter and exit a method. When I thought that probably there is some feature or plugin for Eclipse that can track it for me and show me. After all, this is information the java compiler has at hand.
What I need is to see the order in which each method is called and returns.
It should print the method name and all the stack above it, so I can know who called.
Optionally, if it prints the time of enter and return and the difference, it would be good info for profiling.
I remember trying TraceView in the past, I don't know if it is the answr, but I clearly remember that there was too much information there and I could not get a clear picture of what was going on.
If someone knows how to properly use it to get only the info I need, it would be great too.
UPDATE:
I am having hard time using TraceView and his companion dmtracedump. I did something I wasn't supposed to do, I searched dmtracedump code source and look into it.
This is code producing the error message I am getting.
TraceData data1;
DataKeys* dataKeys = parseDataKeys(&data1, gOptions.traceFileName,
&sumThreadTime);
if (dataKeys == NULL) {
fprintf(stderr, "Cannot read trace.\n");
exit(1);
}
But I don't know how to fix the trace file.
It is generated by Debug.startMethodTracing("tracefile");
I wish there was a way to tell the Java compiler to print each method call. I am quite frustrated at this point.
I found a way to modify the file by myself to insert and delete Log messages anywhere in my source.
I wrote it in this post