Mercurial > hg > truffle
annotate src/share/vm/utilities/events.hpp @ 1913:3b2dea75431e
6984311: JSR 292 needs optional bootstrap method parameters
Summary: Allow CONSTANT_InvokeDynamic nodes to have any number of extra operands.
Reviewed-by: twisti
author | jrose |
---|---|
date | Sat, 30 Oct 2010 13:08:23 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
2 * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 // Events and EventMark provide interfaces to log events taking place in the vm. | |
26 // This facility is extremly useful for post-mortem debugging. The eventlog | |
27 // often provides crucial information about events leading up to the crash. | |
28 // | |
29 // All arguments past the format string must be passed as an intptr_t. | |
30 // | |
31 // To log a single event use: | |
32 // Events::log("New nmethod has been created " INTPTR_FORMAT, nm); | |
33 // | |
34 // To log a block of events use: | |
35 // EventMark m("GarbageCollecting %d", (intptr_t)gc_number); | |
36 // | |
37 // The constructor to eventlog indents the eventlog until the | |
38 // destructor has been executed. | |
39 // | |
40 // IMPLEMENTATION RESTRICTION: | |
41 // Max 3 arguments are saved for each logged event. | |
42 // | |
43 | |
44 class Events : AllStatic { | |
45 public: | |
46 // Logs an event, format as printf | |
47 static void log(const char* format, ...) PRODUCT_RETURN; | |
48 | |
49 // Prints all events in the buffer | |
50 static void print_all(outputStream* st) PRODUCT_RETURN; | |
51 | |
52 // Prints last number events from the event buffer | |
53 static void print_last(outputStream *st, int number) PRODUCT_RETURN; | |
54 }; | |
55 | |
56 class EventMark : public StackObj { | |
57 public: | |
58 // log a begin event, format as printf | |
59 EventMark(const char* format, ...) PRODUCT_RETURN; | |
60 // log an end event | |
61 ~EventMark() PRODUCT_RETURN; | |
62 }; | |
63 | |
64 int print_all_events(outputStream *st); |