Mercurial > hg > truffle
annotate src/cpu/zero/vm/javaFrameAnchor_zero.hpp @ 7448:b735136e0d82
8004132: SerialGC: ValidateMarkSweep broken when running GCOld
Summary: Remove bit-rotten ValidateMarkSweep functionality and flag.
Reviewed-by: johnc, jmasa
Contributed-by: tamao <tao.mao@oracle.com>
author | johnc |
---|---|
date | Wed, 02 Jan 2013 11:32:41 -0800 |
parents | f95d63e2154a |
children |
rev | line source |
---|---|
1010 | 1 /* |
1972 | 2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. |
1505 | 3 * Copyright 2007, 2008, 2010 Red Hat, Inc. |
1010 | 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * | |
6 * This code is free software; you can redistribute it and/or modify it | |
7 * under the terms of the GNU General Public License version 2 only, as | |
8 * published by the Free Software Foundation. | |
9 * | |
10 * This code is distributed in the hope that it will be useful, but WITHOUT | |
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 * version 2 for more details (a copy is included in the LICENSE file that | |
14 * accompanied this code). | |
15 * | |
16 * You should have received a copy of the GNU General Public License version | |
17 * 2 along with this work; if not, write to the Free Software Foundation, | |
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
19 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1512
diff
changeset
|
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1512
diff
changeset
|
21 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1512
diff
changeset
|
22 * questions. |
1010 | 23 * |
24 */ | |
25 | |
1972 | 26 #ifndef CPU_ZERO_VM_JAVAFRAMEANCHOR_ZERO_HPP |
27 #define CPU_ZERO_VM_JAVAFRAMEANCHOR_ZERO_HPP | |
28 | |
1505 | 29 private: |
30 ZeroFrame* volatile _last_Java_fp; | |
31 | |
1010 | 32 public: |
33 // Each arch must define reset, save, restore | |
34 // These are used by objects that only care about: | |
35 // 1 - initializing a new state (thread creation, javaCalls) | |
36 // 2 - saving a current state (javaCalls) | |
37 // 3 - restoring an old state (javaCalls) | |
1505 | 38 // Note that whenever _last_Java_sp != NULL other anchor fields |
39 // must be valid. The profiler apparently depends on this. | |
1010 | 40 |
41 void clear() { | |
42 // clearing _last_Java_sp must be first | |
43 _last_Java_sp = NULL; | |
44 // fence? | |
1505 | 45 _last_Java_fp = NULL; |
1010 | 46 _last_Java_pc = NULL; |
47 } | |
48 | |
49 void copy(JavaFrameAnchor* src) { | |
1505 | 50 set(src->_last_Java_sp, src->_last_Java_pc, src->_last_Java_fp); |
51 } | |
52 | |
53 void set(intptr_t* sp, address pc, ZeroFrame* fp) { | |
1010 | 54 // In order to make sure the transition state is valid for "this" |
55 // We must clear _last_Java_sp before copying the rest of the new | |
56 // data | |
57 // | |
58 // Hack Alert: Temporary bugfix for 4717480/4721647 To act like | |
59 // previous version (pd_cache_state) don't NULL _last_Java_sp | |
60 // unless the value is changing | |
61 // | |
1505 | 62 if (_last_Java_sp != sp) |
1010 | 63 _last_Java_sp = NULL; |
64 | |
1505 | 65 _last_Java_fp = fp; |
66 _last_Java_pc = pc; | |
1010 | 67 // Must be last so profiler will always see valid frame if |
68 // has_last_frame() is true | |
1505 | 69 _last_Java_sp = sp; |
1010 | 70 } |
71 | |
72 bool walkable() { | |
73 return true; | |
74 } | |
75 | |
76 void make_walkable(JavaThread* thread) { | |
77 // nothing to do | |
78 } | |
79 | |
80 intptr_t* last_Java_sp() const { | |
81 return _last_Java_sp; | |
82 } | |
83 | |
1505 | 84 ZeroFrame* last_Java_fp() const { |
85 return _last_Java_fp; | |
1010 | 86 } |
1512 | 87 |
1729 | 88 address last_Java_pc() const { |
89 return _last_Java_pc; | |
90 } | |
91 | |
1512 | 92 static ByteSize last_Java_fp_offset() { |
93 return byte_offset_of(JavaFrameAnchor, _last_Java_fp); | |
94 } | |
1972 | 95 |
96 #endif // CPU_ZERO_VM_JAVAFRAMEANCHOR_ZERO_HPP |