Skip to main content

-Dsun.java2d.trace=count not providing output

4 replies [Last post]
bowsermail
Offline
Joined: 2009-05-21

Hi All,

I'm creating a GUI that uses a custom skin using Synth. I would like to know more about how I can determine how much rendering is being done using the hardware acceleration on my machine. I've found that the Java 6 SE Troubleshooting Guide has some suggestions on how to do this. It mentions that the -Dsun.java2d.opengl=True setting (with a capital "T") can be used to switch to using the OpenGL pipeline with trace output enabled. Another setting -Dsun.java2d.trace=count provides a summary of primitives used that is dumped on application exit.

The problem I've having is that these system properties don't provide output for me - I don't see any trace output on the console. The steps I followed are:

1) compile the GUI to a jar, gui.jar
2) export J2D_TRACE_LEVEL=4
3) try java -jar gui.jar -Dsun.java2d.trace=count -> jar runs but no trace counts on exit
4) try java -jar gui.jar -Dsun.java2d.opengl=True -> jar runs but no trace provided during run

The GUI is skinned using images and Java2D primitives so I expect that the mix of graphics routines would invoke hardware acceleration of some kind. Is there something I'm missing here? Were these system properties perhaps removed for the update 10 stable builds?

I've tried this with Java 6 update 10 and update 13. Interestingly, the GUI ran very slow on update 10 without the opengl=True setting but not in the case of update 13 so I'm assuming 13 came out with more optimised / accelerated routines. Also the opengl=True setting provided some output on update 10 but not on update 13.

I've tried this on Ubuntu Jaunty (9.04) and Hardy (8.04). My graphics card is a NVidia GeForce series card.

Thanks for reading,

Mark

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jim Graham

Dmitri already pointed out your problem with the placing of the command
line options, but I wanted to mention some issues with the options you
were using:

I don't think opengl=True provides trace output (Chris?). I think all
it does is it prints a message saying "Yes, indeed, I did successfully
enable the OpenGL pipeline" at startup and that's it.

Also, only some output is included in the production builds for
J2D_TRACE_LEVEL. Most of the code that honors that is #ifdef'd DEBUG.

Finally, sun.java2d.trace=log can be used to log each operation as it
occurs...

...jim

java2d@JAVADESKTOP.ORG wrote:
> Hi All,
>
> I'm creating a GUI that uses a custom skin using Synth. I would like to know more about how I can determine how much rendering is being done using the hardware acceleration on my machine. I've found that the Java 6 SE Troubleshooting Guide has some suggestions on how to do this. It mentions that the [b]-Dsun.java2d.opengl=True[/b] setting (with a capital "T") can be used to switch to using the OpenGL pipeline with trace output enabled. Another setting [b]-Dsun.java2d.trace=count[/b] provides a summary of primitives used that is dumped on application exit.
>
> The problem I've having is that these system properties don't provide output for me - I don't see any trace output on the console. The steps I followed are:
>
> 1) compile the GUI to a jar, [b]gui.jar[/b]
> 2) [b]export J2D_TRACE_LEVEL=4[/b]
> 3) try [b]java -jar gui.jar -Dsun.java2d.trace=count[/b] -> jar runs but no trace counts on exit
> 4) try [b]java -jar gui.jar -Dsun.java2d.opengl=True[/b] -> jar runs but no trace provided during run
>
> The GUI is skinned using images and Java2D primitives so I expect that the mix of graphics routines would invoke hardware acceleration of some kind. Is there something I'm missing here? Were these system properties perhaps removed for the update 10 stable builds?
>
> I've tried this with Java 6 update 10 and update 13. Interestingly, the GUI ran very slow on update 10 without the [b]opengl=True[/b] setting but not in the case of update 13 so I'm assuming 13 came out with more optimised / accelerated routines. Also the [b]opengl=True[/b] setting provided some output on update 10 but not on update 13.
>
> I've tried this on Ubuntu Jaunty (9.04) and Hardy (8.04). My graphics card is a NVidia GeForce series card.
>
> Thanks for reading,
>
> Mark
> [Message sent by forum member 'bowsermail' (bowsermail)]
>
> http://forums.java.net/jive/thread.jspa?messageID=347167
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

bowsermail
Offline
Joined: 2009-05-21

Thanks for the tips, Jim.

Dmitri Trembovetski

java2d@JAVADESKTOP.ORG wrote:
> Hi All,
>
> I'm creating a GUI that uses a custom skin using Synth. I would like to know more about how I can determine how much rendering is being done using the hardware acceleration on my machine. I've found that the Java 6 SE Troubleshooting Guide has some suggestions on how to do this. It mentions that the [b]-Dsun.java2d.opengl=True[/b] setting (with a capital "T") can be used to switch to using the OpenGL pipeline with trace output enabled. Another setting [b]-Dsun.java2d.trace=count[/b] provides a summary of primitives used that is dumped on application exit.
>
> The problem I've having is that these system properties don't provide output for me - I don't see any trace output on the console. The steps I followed are:
>
> 1) compile the GUI to a jar, [b]gui.jar[/b]
> 2) [b]export J2D_TRACE_LEVEL=4[/b]
> 3) try [b]java -jar gui.jar -Dsun.java2d.trace=count[/b] -> jar runs but no trace counts on exit
> 4) try [b]java -jar gui.jar -Dsun.java2d.opengl=True[/b] -> jar runs but no trace provided during run

You need to put -Dstuff=stuff before -jar, otherwise it is treated as a
parameter to your application, not java runtime.

Dmitr

>
> The GUI is skinned using images and Java2D primitives so I expect that the mix of graphics routines would invoke hardware acceleration of some kind. Is there something I'm missing here? Were these system properties perhaps removed for the update 10 stable builds?
>
> I've tried this with Java 6 update 10 and update 13. Interestingly, the GUI ran very slow on update 10 without the [b]opengl=True[/b] setting but not in the case of update 13 so I'm assuming 13 came out with more optimised / accelerated routines. Also the [b]opengl=True[/b] setting provided some output on update 10 but not on update 13.
>
> I've tried this on Ubuntu Jaunty (9.04) and Hardy (8.04). My graphics card is a NVidia GeForce series card.
>
> Thanks for reading,
>
> Mark
> [Message sent by forum member 'bowsermail' (bowsermail)]
>
> http://forums.java.net/jive/thread.jspa?messageID=347167
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

bowsermail
Offline
Joined: 2009-05-21

Ah, yes. Thanks, silly mistake. And I ran the GUI with update 10 using eclipse which explains why it worked then.

Message was edited by: bowsermail