20

I'm new to eclipse's TPTP profiling tool . I have received a TPTP trace and I need help to understand the content provided. The trace that contains function call entry and exists alongside with parameter of the function call on entry. It is from JHotDraw, a Java program . Here is a sample of the trace:

Entered: CH/ifa/draw/standard/ToolButton.paint---[sun.java2d.SunGraphics2D[font=javax.swing.plaf.FontUIResource[family=Dialog,name=Dialog,style=bold,size=12],color=sun.swing.PrintColorUIResource[r=51,g=51,b=51]]] Exited: CH/ifa/draw/standard/ToolButton.paint---[sun.java2d.SunGraphics2D[font=javax.swing.plaf.FontUIResource[family=Dialog,name=Dialog,style=bold,size=12],color=sun.swing.PrintColorUIResource[r=51,g=51,b=51]]]

Entered: CH/ifa/draw/application/DrawApplication.paletteUserOver---[CH.ifa.draw.standard.ToolButton[,304,1,24x24,disabled,alignmentX=0.0,alignmentY=0.5,border=javax.swing.border.CompoundBorder@1308786,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=javax.swing.ImageIcon@1f647e2,disabledIcon=sun.swing.ImageIconUIResource@d253d9,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=javax.swing.ImageIcon@924039,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=javax.swing.ImageIcon@5c7d2e,text=,defaultCapable=false], false]

My questions are:

1)I would like to know why the parameters are sometimes detailed in variable\value pairs (like the PrintColorUIResource object in the first line) and sometimes given as a reference like ImageIcon@924039?

According tot he doc args should output all method arguments.

2) When the parameter is a complex type, how does TPTP describe its content? For example, in the first line, the parameter of the function is an object of type sun.java2d.SunGraphics2D. This object is described by two values, font and color, each of which is recessively defined. From the documentation (link below), I can see the object SunGraphics2D has dozens of local variables, one of which is called font, but none called color. The constructor does have two parameters color and font, but also two other parameters.

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/sun/java2d/SunGraphics2D.java

Likewise object sun.swing.PrintColorUIResource at the end of the same function call is described w.r.t. 3 valuse, r,g,b. I can't find these variable in the documentation.

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/swing/PrintColorUIResource.java#PrintColorUIResource

3) Why is the value or the variable name sometimes ommited? eg: maximumSize=,minimumSize=, ... or at the end of the 3rd fct call : =false], false]

4) Is there any documentation I can refer myself to to better understand the trace content?

Thank you for your help and your kind consideration.

el-teedee
  • 1,293
  • 1
  • 15
  • 27
Rafa
  • 1,151
  • 9
  • 17
  • Wasn't TPTP archived? According to the project page, it isn't wasn't even in the Indigo release. http://www.eclipse.org/tptp/home/downloads/ . If you really want to ride that dead horse, the information you are looking for might be here: http://www.eclipse.org/tptp/home/documents/documentation.php?version=4.1.0&audience=user . But I get a 403 forbidden, when I clcik those links. Maybe you have more luck there. edit: an overview of the documentation is here: http://www.eclipse.org/tptp/home/documents/index.html – Calon Nov 26 '15 at 07:29
  • Can you put your code which is generating this TPTP trace .. Please tag me while answering, else I will not get notification ... – hagrawal7777 Nov 26 '15 at 20:14
  • @hagrawal Here is the probe that generated the tracse: >REM unnamed_probe >PROBE >REF ONENTRY myprobe_probe$Probe_0 _entry >(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V >className,methodName,args >REF ONEXIT myprobe_probe$Probe_0 _exit >(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V >className,methodName,args >REF ONCATCH myprobe_probe$Probe_0 _catch >(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V >exceptionObject,className,methodName – Rafa Dec 01 '15 at 15:52
  • @Calon Well, a lot of people are still using TPTP. On my isde, I needed a tracer that gives me a list of method calls with their parameters. Any other option you know of? – Rafa Dec 01 '15 at 15:53
  • 1
    @Rafa You can have a look at this question: http://stackoverflow.com/questions/11504829/what-do-you-use-for-profiling-in-eclipse-now-that-tptp-is-going-to-be-archived – Calon Dec 02 '15 at 09:00
  • Hope these links have more information https://wiki.eclipse.org/TPTP_Profiler https://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html – DAIRAV Apr 04 '18 at 06:14
  • I would *guess* that all parameters are `toString`'d. Some classes have a useful toString, some don't. – user253751 Feb 25 '23 at 04:02

0 Answers0