comparison src/share/vm/code/pcDesc.hpp @ 931:72088be4b386

6873116: Modify reexecute implementation to use pcDesc to record the reexecute bit Summary: use PcDesc to keep record of the reexecute bit instead of using DebugInfoStreams Reviewed-by: kvn, never, twisti
author cfang
date Thu, 20 Aug 2009 12:42:57 -0700
parents a61af66fc99e
children 8e954aedbb81
comparison
equal deleted inserted replaced
930:357d4e2eb4dd 931:72088be4b386
1 /* 1 /*
2 * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
32 private: 32 private:
33 int _pc_offset; // offset from start of nmethod 33 int _pc_offset; // offset from start of nmethod
34 int _scope_decode_offset; // offset for scope in nmethod 34 int _scope_decode_offset; // offset for scope in nmethod
35 int _obj_decode_offset; 35 int _obj_decode_offset;
36 36
37 union PcDescFlags {
38 int word;
39 struct {
40 unsigned int reexecute: 1;
41 } bits;
42 } _flags;
43
37 public: 44 public:
38 int pc_offset() const { return _pc_offset; } 45 int pc_offset() const { return _pc_offset; }
39 int scope_decode_offset() const { return _scope_decode_offset; } 46 int scope_decode_offset() const { return _scope_decode_offset; }
40 int obj_decode_offset() const { return _obj_decode_offset; } 47 int obj_decode_offset() const { return _obj_decode_offset; }
41 48
51 // upper and lower exclusive limits real offsets: 58 // upper and lower exclusive limits real offsets:
52 lower_offset_limit = -1, 59 lower_offset_limit = -1,
53 upper_offset_limit = (unsigned int)-1 >> 1 60 upper_offset_limit = (unsigned int)-1 >> 1
54 }; 61 };
55 62
63 // Flags
64 bool should_reexecute() const { return _flags.bits.reexecute; }
65 void set_should_reexecute(bool z) { _flags.bits.reexecute = z; }
66
56 // Returns the real pc 67 // Returns the real pc
57 address real_pc(const nmethod* code) const; 68 address real_pc(const nmethod* code) const;
58 69
59 void print(nmethod* code); 70 void print(nmethod* code);
60 bool verify(nmethod* code); 71 bool verify(nmethod* code);