Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / July 2003

Tip: Looking for answers? Try searching our database.

hsperfdata

Thread view: 
Brian S O'Neill - 03 Jul 2003 06:35 GMT
I just noticed that on the win32 version of jdk1.4.2, when it runs it
creates a hsperfdata_<username> directory in my temp directory with a small
numbered file. The file is 16k bytes, but I assume it can vary. Other VMs
running get a different number for their file. When the VM exits, the file
is deleted. While the VM is running, I cannot access the file to see what's
in it. I'm not sure if this feature exists on other platforms or previous
versions of the jdk, but I do know it didn't exist in jdk1.3.1.

Does anyone know the purpose of this file? By the name I can guess it has
something to do with HotSpot gathering performance data. If the file is
always 16k bytes, it sure isn't saving much memory storing this data in a
file. Since the file is deleted upon exit, the VM isn't preserving any
profiling data for future runs. Even if the file were to grow larger, it
wouldn't likely save any memory if its accessed often enough - the file
cache will hold it in memory.
Joseph Millar - 04 Jul 2003 18:27 GMT
> I just noticed that on the win32 version of jdk1.4.2, when it runs it
> creates a hsperfdata_<username> directory in my temp directory with a small
[quoted text clipped - 11 lines]
> wouldn't likely save any memory if its accessed often enough - the file
> cache will hold it in memory.

It's not created to save space, like you said, 16k (4 pages) is
less than nothing when we're talking mem usage.  The file is
created as part of win32's memory mapped file system.  In essence,
it allows multiple processes to share the same piece of memory,
to share information or whatnot.  Exactly who outside the current
process might want shared memory is a mystery.  I imagine Sun
has some tools for understanding the layout of this memory, which
appears to be a bunch of Hotspot statistics (you can cat the file).
A quick search through the developer site doesn't reveal anything really
interesting (but I only did a brief search).  A similar mechanism
exists on other platforms, so this file exists on most platforms.

If you want to see the code that creates the shared memory, check
out the hotspot\src\os\win32\vm\perfMemory_win32.cpp file in the
JVM sources.  It's interesting reading.

--Joe


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.