Mercurial > hg > truffle
diff src/share/vm/code/nmethod.hpp @ 2339:3d5a546351ef
7023931: PcDescCache::find_pc_desc should not write _last_pc_desc
Summary: Remove _last_pc_desc and use pcdescs[0] instead.
Reviewed-by: dcubed, coleenp, ysr
author | phh |
---|---|
date | Fri, 11 Mar 2011 16:09:55 -0500 |
parents | 1b4e6a5d98e0 |
children | 65f880e2869b |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.hpp Thu Mar 10 17:44:32 2011 +0100 +++ b/src/share/vm/code/nmethod.hpp Fri Mar 11 16:09:55 2011 -0500 @@ -69,14 +69,13 @@ friend class VMStructs; private: enum { cache_size = 4 }; - PcDesc* _last_pc_desc; // most recent pc_desc found PcDesc* _pc_descs[cache_size]; // last cache_size pc_descs found public: - PcDescCache() { debug_only(_last_pc_desc = NULL); } + PcDescCache() { debug_only(_pc_descs[0] = NULL); } void reset_to(PcDesc* initial_pc_desc); PcDesc* find_pc_desc(int pc_offset, bool approximate); void add_pc_desc(PcDesc* pc_desc); - PcDesc* last_pc_desc() { return _last_pc_desc; } + PcDesc* last_pc_desc() { return _pc_descs[0]; } }; @@ -178,7 +177,7 @@ unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes? // Protected by Patching_lock - unsigned char _state; // {alive, not_entrant, zombie, unloaded) + unsigned char _state; // {alive, not_entrant, zombie, unloaded} #ifdef ASSERT bool _oops_are_stale; // indicates that it's no longer safe to access oops section