review for 7108242: jinfo -permstat shouldn't report interned strings as part of perm

Tom Rodriguez tom.rodriguez at
Fri Nov 4 10:25:47 PDT 2011

That's right.  The code will properly report the space taken by interned strings but it's inappropriate to report it as part of the -permstat output.


On Nov 4, 2011, at 12:37 AM, Krystal Mok wrote:

> Hi David,
> FYI:
> I'm not sure what's the best way to expose the stats of interned strings, but from an implementation perspective, the size of interned strings can easily be determined by scanning the StringTable in HotSpot. It can be done from both inside the HotSpot VM itself; or from the Serviceability Agent (via sun.jvm.hotspot.memory.StringTable).
> The StringTable data structure keeps **references** (oops) to the interned String objects, instead the Strings themselves. It doesn't really matter whether or not the Strings are in PermGen or not. The table itself was never stored in the GC heap; instead it's a part of the GC root set.
> Regards,
> Kris Mok
> On Fri, Nov 4, 2011 at 9:09 AM, David Schlosnagle <schlosna at> wrote:
> > Tom Rodriguez wrote:
> > jinfo -permstat still reports interned strings as part of the perm gen
> > which is no longer true.  It should be dropped.
> Out of curiosity, is there any way to determine the size of the
> interned strings now that they are no longer in PermGen? I assume that
> since 6962931 [1] with interned strings moving to the regular heap
> there isn't any way to compute the size of interned strings other than
> through a heap dump where they would show up like any other String,
> but I'd just like to confirm.
> Thanks,
> Dave
> [1]

More information about the hotspot-compiler-dev mailing list