Mercurial > hg > truffle
comparison src/share/vm/code/nmethod.cpp @ 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 | 98cb887364d3 |
children | b1606b3c0a8a 148e5441d916 |
comparison
equal
deleted
inserted
replaced
930:357d4e2eb4dd | 931:72088be4b386 |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2008 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. |
964 | 964 |
965 ScopeDesc* nmethod::scope_desc_at(address pc) { | 965 ScopeDesc* nmethod::scope_desc_at(address pc) { |
966 PcDesc* pd = pc_desc_at(pc); | 966 PcDesc* pd = pc_desc_at(pc); |
967 guarantee(pd != NULL, "scope must be present"); | 967 guarantee(pd != NULL, "scope must be present"); |
968 return new ScopeDesc(this, pd->scope_decode_offset(), | 968 return new ScopeDesc(this, pd->scope_decode_offset(), |
969 pd->obj_decode_offset()); | 969 pd->obj_decode_offset(), pd->should_reexecute()); |
970 } | 970 } |
971 | 971 |
972 | 972 |
973 void nmethod::clear_inline_caches() { | 973 void nmethod::clear_inline_caches() { |
974 assert(SafepointSynchronize::is_at_safepoint(), "cleaning of IC's only allowed at safepoint"); | 974 assert(SafepointSynchronize::is_at_safepoint(), "cleaning of IC's only allowed at safepoint"); |
1930 ic = CompiledIC_at(call_site); | 1930 ic = CompiledIC_at(call_site); |
1931 } | 1931 } |
1932 PcDesc* pd = pc_desc_at(ic->end_of_call()); | 1932 PcDesc* pd = pc_desc_at(ic->end_of_call()); |
1933 assert(pd != NULL, "PcDesc must exist"); | 1933 assert(pd != NULL, "PcDesc must exist"); |
1934 for (ScopeDesc* sd = new ScopeDesc(this, pd->scope_decode_offset(), | 1934 for (ScopeDesc* sd = new ScopeDesc(this, pd->scope_decode_offset(), |
1935 pd->obj_decode_offset()); | 1935 pd->obj_decode_offset(), pd->should_reexecute()); |
1936 !sd->is_top(); sd = sd->sender()) { | 1936 !sd->is_top(); sd = sd->sender()) { |
1937 sd->verify(); | 1937 sd->verify(); |
1938 } | 1938 } |
1939 } | 1939 } |
1940 | 1940 |
2179 // Return a the last scope in (begin..end] | 2179 // Return a the last scope in (begin..end] |
2180 ScopeDesc* nmethod::scope_desc_in(address begin, address end) { | 2180 ScopeDesc* nmethod::scope_desc_in(address begin, address end) { |
2181 PcDesc* p = pc_desc_near(begin+1); | 2181 PcDesc* p = pc_desc_near(begin+1); |
2182 if (p != NULL && p->real_pc(this) <= end) { | 2182 if (p != NULL && p->real_pc(this) <= end) { |
2183 return new ScopeDesc(this, p->scope_decode_offset(), | 2183 return new ScopeDesc(this, p->scope_decode_offset(), |
2184 p->obj_decode_offset()); | 2184 p->obj_decode_offset(), p->should_reexecute()); |
2185 } | 2185 } |
2186 return NULL; | 2186 return NULL; |
2187 } | 2187 } |
2188 | 2188 |
2189 void nmethod::print_code_comment_on(outputStream* st, int column, u_char* begin, u_char* end) { | 2189 void nmethod::print_code_comment_on(outputStream* st, int column, u_char* begin, u_char* end) { |