Trivial bug in psScavenge.cpp?

Jeremy Manson jeremymanson at google.com
Fri Oct 25 19:35:24 PDT 2013


Hi folks,

Following my habit of reporting trivial bugs (and perhaps my habit of being
wrong about their being bugs).  I've been playing around with the
event-based JVM tracing API, since we had our own version of the same thing
internally (amusingly, we called our timer TraceGCTime instead of
GCTraceTime, but it did almost exactly the same thing).  I noticed this in
psScavenge.cpp:

      469     GCTraceTime tm("StringTable", false, false, &_gc_timer);
      470     // Unlink any dead interned Strings and process the remaining
live ones.
      471     PSScavengeRootsClosure root_closure(promotion_manager);
      472     StringTable::unlink_or_oops_do(&_is_alive_closure,
&root_closure);

That's all well and good, but surely you want curly braces before line 469
and after line 472?  Otherwise it credits a lot more time to string table
processing than is appropriate...

Jeremy


More information about the hotspot-dev mailing list