Lines 1-45
Link Here
|
1 |
$FreeBSD: ports/java/jmp/files/patch-jmp.c,v 1.1 2003/05/15 16:34:36 glewis Exp $ |
|
|
2 |
|
3 |
--- jmp.c Tue May 13 23:17:03 2003 |
4 |
+++ jmp.c Tue May 13 23:17:47 2003 |
5 |
@@ -1548,10 +1548,11 @@ |
6 |
free (cf); |
7 |
} |
8 |
|
9 |
-void enable_method_events () { |
10 |
+void enable_method_events_and_stacks (int get_stacks) { |
11 |
/* Ok, the thread stacks are bogous, clear them all and try to get |
12 |
* real stacks, timing will be a bit bogous, but not to much... |
13 |
*/ |
14 |
+ if (get_stacks) { |
15 |
jmphash_lock (threads); |
16 |
jmphash_lock (methods); |
17 |
jvmpi->DisableGC (); |
18 |
@@ -1559,6 +1560,7 @@ |
19 |
jvmpi->EnableGC (); |
20 |
jmphash_unlock (methods); |
21 |
jmphash_unlock (threads); |
22 |
+ } |
23 |
|
24 |
method_profiling = 1; |
25 |
/* |
26 |
@@ -1572,6 +1574,10 @@ |
27 |
jvmpi->EnableEvent (JVMPI_EVENT_METHOD_EXIT, NULL); |
28 |
} |
29 |
|
30 |
+void enable_method_events () { |
31 |
+ enable_method_events_and_stacks (1); |
32 |
+} |
33 |
+ |
34 |
static void enable_dump_events () { |
35 |
dump_enabled = 1; |
36 |
jvmpi->EnableEvent (JVMPI_EVENT_DATA_DUMP_REQUEST, NULL); |
37 |
@@ -1603,7 +1609,7 @@ |
38 |
enable_object_events (); |
39 |
enable_thread_events (); |
40 |
if (method_profiling) |
41 |
- enable_method_events (); |
42 |
+ enable_method_events_and_stacks (0); |
43 |
if (dump_enabled) |
44 |
enable_dump_events (); |
45 |
if (monitor_profiling) |