1 #ifdef USE_PRAGMA_IDENT_HDR
2 #pragma ident "@(#)codeBuffer.hpp 1.63 07/05/17 15:49:26 JVM"
3 #endif
4 /*
5 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7 *
8 * This code is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 only, as
10 * published by the Free Software Foundation.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23 * CA 95054 USA or visit www.sun.com if you need additional information or
24 * have any questions.
25 *
26 */
27
28 class CodeComments;
29 class AbstractAssembler;
30 class MacroAssembler;
31 class PhaseCFG;
32 class Compile;
33 class BufferBlob;
34 class CodeBuffer;
35
36 class CodeOffsets: public StackObj {
37 public:
38 enum Entries { Entry,
39 Verified_Entry,
40 Frame_Complete, // Offset in the code where the frame setup is (for forte stackwalks) is complete
41 OSR_Entry,
42 Exceptions, // Offset where exception handler lives
43 Deopt, // Offset where deopt handler lives
44 max_Entries };
45
46 // special value to note codeBlobs where profile (forte) stack walking is
47 // always dangerous and suspect.
48
49 enum { frame_never_safe = -1 };
50
51 private:
52 int _values[max_Entries];
53
54 public:
55 CodeOffsets() {
56 _values[Entry] = 0;
57 _values[Verified_Entry] = 0;
58 _values[Frame_Complete] = frame_never_safe;
59 _values[OSR_Entry] = 0;
60 _values[Exceptions] = -1;
61 _values[Deopt] = -1;
|
1 #ifdef USE_PRAGMA_IDENT_HDR
2 #pragma ident "@(#)codeBuffer.hpp 1.63 07/05/17 15:49:26 JVM"
3 #endif
4 /*
5 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7 *
8 * This code is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 only, as
10 * published by the Free Software Foundation.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23 * CA 95054 USA or visit www.sun.com if you need additional information or
24 * have any questions.
25 *
26 */
27
28 class CodeComments;
29 class AbstractAssembler;
30 class MacroAssembler;
31 class PhaseCFG;
32 class Compile;
33 class BufferBlob;
34 class CodeBuffer;
35
36 class CodeOffsets: public StackObj {
37 public:
38 enum Entries { Entry,
39 Verified_Entry,
40 Frame_Complete, // Offset in the code where the frame setup is (for forte stackwalks) is complete
41 OSR_Entry,
42 Dtrace_trap = OSR_Entry, // dtrace probes can never have an OSR entry so reuse it
43 Exceptions, // Offset where exception handler lives
44 Deopt, // Offset where deopt handler lives
45 max_Entries };
46
47 // special value to note codeBlobs where profile (forte) stack walking is
48 // always dangerous and suspect.
49
50 enum { frame_never_safe = -1 };
51
52 private:
53 int _values[max_Entries];
54
55 public:
56 CodeOffsets() {
57 _values[Entry] = 0;
58 _values[Verified_Entry] = 0;
59 _values[Frame_Complete] = frame_never_safe;
60 _values[OSR_Entry] = 0;
61 _values[Exceptions] = -1;
62 _values[Deopt] = -1;
|