Profile Image
vishnupriya

What is Memory tuning: -XX:-StackTraceInThrowable?

What is Memory tuning: -XX:-StackTraceInThrowable? Have you used this JVM arguement before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvmargument

  • xx-stacktraceinthrowable

  • x-stacktraceinthrowable

  • Memory tuning

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

You can removes stack traces from exceptions.:

 

-XX:-StackTraceInThrowable

 

Description:

 

This option removes stack traces from exceptions.

 

While stack traces are included in exceptions by default, recording them can have a negative impact on performance. Use this option if you want to remove stack traces, although this might cause difficulties with problem determination.

 

When this option is enabled, Throwable.getStackTrace() returns an empty array and the stack trace is displayed when an uncaught exception occurs. Thread.getStackTrace() and Thread.getAllStackTraces() are not affected by this option.

 

Default Value:

 

Disabled by default.

 

Errors:

 

None

 

Arguments related:

 

None

 

Related Posts:

NOTE:

 

If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvmargument

  • xx-stacktraceinthrowable

  • x-stacktraceinthrowable

  • Memory tuning