Mike's Java Profiler Change Log
Added an OS-specific hack to work-around the JDK limitation that prevents the environment of a child process to be modified version
of the JVM's environment. This fix allows the entire current environment of the MJP GUI process plus the needed alterations to be
passed to the profiled process. The alterations can be, as before, specified via the Environement dialog accessable from
File->Run->Environment. The hack should work on Windows NT/2000/XP, UNIX/Linux, and possibly on MacOS/X, but probably not
anywhere else. The hack works by executing 'cmd /c set' on Windows and 'env' on UNIX and then parsing the output stream.
Fixed a case sensitivity bug on Windows that caused MJP to report files with .EXE, .COM, and .BAT extensions as non-executable.
Also added .CMD to the list of executable extensions. FYI: this craziness is needed because java.io.File does not have an
canExecute() function and the exceptions tossed by Runtime.exec() make it really hard to determine the cause of a problem.
- Significantly increased the performance of profile data file reads.
- Fixed a slew of memory leaks in the GUI. Basically, every datafile ever opened was kept in memory indefinitely.
Fixed the Restore Defaults button on the environment dialog accessable from File->Run->Environment. This was broken in last
release by the fix to the Restore Defaults button on the environment tab accessable from Tools->Options->Environment. Now
both buttons should work.
- Increased the robustness of the help system's error handling. In now reacts more elegantly if the help content is missing.
- Fixed bug #838150 "Remove button causes ArrayIndexOutOfBoundsException".
- Fixed bug #901804 "Times Thread Summary Window reports incorrect CPU informatio"
- Replaced mjp.bat with a .exe bootstrapper.
- One small fix to allow compilation with gcc 3.3.1.
- Fixed the Restore Defaults on the Tools->Options->Environment dialog. Now it actually works.
- Added -Djava.compiler=NONE to the default environment on the Tools->Options->Environment dialog.
- Fixed a bug that cause OutOfMemory exceptions if the user attempted to open non-MJP profile datafiles.
- Fixed a typo in the confirmation message on the Tools->options dialog.
- Added an application icon.
- Unless the system property com.fruitioninc.mjp.CONSOLE is set, stdout and stderr are now redirected to a file named mjp.log.
- Added a JavaHelp based online help system.
- Added a significant amount of content to the user manual.
In cases where a frame on the JVM's call-stack exists for which a method-entry event has not been recieved, MJP
calls the JVMPI function GetCallTrace to fill in information about the missing frames. Unfortunatley, MJP has no
way to know when the methods started, so it must fudge in values for cpu and wall time.
Changed the way the graph view handles recursion when reporting time spent in children.
Squashed a bug that caused some traces to be incorrectly recorded in applications that unload classes.
This resulted in methods being reported as being called 0 times.
Diagnostic and debugging information is now written to a file named mjp.log instead of to the console.
Added a new function to the JNI interface: writeData(). This functions causes the current profile data to be written to a file as
automatically happens when the application exits.
Added an experiemental feature that attempts to statisically subtract profiler overhead from the profiler results. This feature can
be enabled by adding 'overheadCorrection=y' to the MJP command line options (e.g. java -Xrunmjp:overheadCorrection=y).
Added command line help text that is displayed when the command line option 'help' is passed (e.g. java -Xrunmjp:help).
- Added sampling mode. This mode records the call stack of every thread periodically. It then reports the number of samples taken
for each method and frame.
- Added virtual call tree root methods. There is not a virtual method at the root of every thread's call tree. These are
placeholders; not real methods. They make is easier to see when a call tree node has no (real) parent.
- Made a number of useability enhancements to the GUI
- Revamped the class meta-data data structure so that object move events could be handled without calling
the malloc library. This should increase stability.
- Fixed a bug in the handling of the last known CPU count. This resulted in a blown assertion that read "Assertion
failed: cpu >= 0.0f, file mjp.cpp, line 485"
- Migrated win32 builds from MSVC++ to GCC. The code no longer compiles with MSVC++. Additionally the build uses GNU
libstdc++ instead of STLport, because I could not get STLport to compile with Cygwin GCC 3.2.
- Fixed a pair of bugs that occurred when the profiled application unloaded one or more classes.
- Fixed a bug in Tree.clear() that was causing supposedly removed values to reappear. This resulted in bogus errors about
the inability to resolve jmethodIDs.
- Fixed a bug that resulted in methods being reported as being called zero times.
- The Linux shared library is now statically linked against libstdc++ in order to avoid compatibility problems with the
version of libstdc++ that the JVM is linked against. See bug #4694590 in Java's bug database for details.
This will hopefully solve the stability problems on Linux.
- Fixed Linux build system to include STL-Port shared library.
- Added high resolution timer for Linux.
- Added File -> Close action.
- Removed the Edit menu. It didn't work and it's not trivial to make it work.
- Added the beginnings of a user manual.
- Added new and improved run dialog.
- Optimized the process frame. It now performs noticeably
better when a profiled process outputs a large amount of
text to the console.
- Improved the look and feel of the process frame.
- Implemented the abort button on the process frame.
- Added audible beep option to the options/preferences dialog.
- Added default environment to the options/preferences dialog.
- Fixed a bug that caused the internal frames (process and
data browser) to not reappear after being closed.
- Changed method list frame so that it requires only a
single click on a column header to cause the sort to
- Added sorting functionality to the method detail frame.
You can now sort the parent and child tables by clicking
on the column headers.
- Added alpha support for Linux.
- Fixed a bug that was causing the method detail panel to
not repaint when it needed to.
- MJP now displays a 'busy' mouse pointer in some cases
where it is doing a long task.
- Fixed a bug that caused a thread with an unknown name to
be reported when profiling a Sun JVM.
- Changed the elapsed time reported in the run summary frame
to be the time difference between when the profiler agent
starts and when the profiler agent begins writing its data
file. Previously, it was the accumulated time between
calls of the JNI functions startProfiler and
- Added CPU time spent by the entire thread to the data file
and revved the data file format to 00.02.
- Improved the way the profiler agent handles the case where
the JVM exits before all methods have exited. It now does
a better job of calculating the CPU spent in the unexited
frames. For more information see the addition of
Thread.lastKnownCpu in mjp.cpp.
- Added call stack panel to the frame detail panel. This
allows the user to navigate up and down the call
- Changed datafile name to [time].mjp.
- Added measurement of wall clock time. Wall clock time is
the time spent in a function as measured by a clock on the
wall. This time includes the time spent executing CPU
cycles as well the time spent idle. Idle time is the
result of such things as CPU contention, lock contention,
- This is an alpha release. It is functional enough to
provide value, but many features are unimplemented or
poorly implemented and very little documentation