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