RFR(S): 8160064: StackWalker implementation added logging option without using UL

Mandy Chung mandy.chung at oracle.com
Tue Sep 27 22:07:49 UTC 2016


> On Sep 27, 2016, at 12:47 PM, Rachel Protacio <rachel.protacio at oracle.com> wrote:
> 
> Hi,
> 
> Please review this small fix correcting the StackWalker print output mechanism by moving it to Unified Logging. Includes a new jtreg test, and passes JPRT.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8160064
> Open webrev: http://cr.openjdk.java.net/~rprotacio/8160064/


Thanks for doing this, Rachel.  This looks good to me.

Comments in the test StackwalkLoggingTest.java
  28  * @modules java.base/jdk.internal.misc

Is this really needed?  I don’t see which class uses classes in jdk.internal.misc package.  If you remove it, does the test fail?

  30  * @compile LocalLongHelper.java 

This can be converted to @build LocalLongHelper to avoid unnecessary recompilation.  On the other hand, this test can simply have its own test class to exec:
  StackWalker sw = StackWalker.getInstance();
  sw.forEach(System.out::println);

LocalLongHelper is intended to test the live stack stream.

  53         if (Platform.is64bit()) {

Max already pointed this out.  The main method can exec a process to run a simple test class as suggested above.

Mandy


More information about the hotspot-runtime-dev mailing list