diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2003-05-15 16:34:36 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2003-05-15 16:34:36 +0000 |
commit | 666153e3b36735345aee68e0777efc0ea3d38a50 (patch) | |
tree | 65eee602f863ab9328df65e00e08ea89a87c36d3 /java/jmp/files/patch-jmp.c | |
parent | * Update to exim-4.20, featuring host of minor bugfixes and some feature (diff) |
. Add the java/jmp port.
JMP is a profiler for java that can be used to trace objects usage and
method timings. JMP uses the JVMPI interface to gather statistics and
interact with the JVM. JMP uses a GTK+ interface to show the status.
PR: 47151, 48474, 50325
Submitted by: Ronald Klop <ronald@cs.vu.nl>
Diffstat (limited to 'java/jmp/files/patch-jmp.c')
-rw-r--r-- | java/jmp/files/patch-jmp.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/java/jmp/files/patch-jmp.c b/java/jmp/files/patch-jmp.c new file mode 100644 index 000000000000..888f0a5dfd48 --- /dev/null +++ b/java/jmp/files/patch-jmp.c @@ -0,0 +1,45 @@ +$FreeBSD$ + +--- jmp.c Tue May 13 23:17:03 2003 ++++ jmp.c Tue May 13 23:17:47 2003 +@@ -1548,10 +1548,11 @@ + free (cf); + } + +-void enable_method_events () { ++void enable_method_events_and_stacks (int get_stacks) { + /* Ok, the thread stacks are bogous, clear them all and try to get + * real stacks, timing will be a bit bogous, but not to much... + */ ++ if (get_stacks) { + jmphash_lock (threads); + jmphash_lock (methods); + jvmpi->DisableGC (); +@@ -1559,6 +1560,7 @@ + jvmpi->EnableGC (); + jmphash_unlock (methods); + jmphash_unlock (threads); ++ } + + method_profiling = 1; + /* +@@ -1572,6 +1574,10 @@ + jvmpi->EnableEvent (JVMPI_EVENT_METHOD_EXIT, NULL); + } + ++void enable_method_events () { ++ enable_method_events_and_stacks (1); ++} ++ + static void enable_dump_events () { + dump_enabled = 1; + jvmpi->EnableEvent (JVMPI_EVENT_DATA_DUMP_REQUEST, NULL); +@@ -1603,7 +1609,7 @@ + enable_object_events (); + enable_thread_events (); + if (method_profiling) +- enable_method_events (); ++ enable_method_events_and_stacks (0); + if (dump_enabled) + enable_dump_events (); + if (monitor_profiling) |