Mercurial > hg > graal-jvmci-8
comparison src/share/vm/ci/ciMethodData.cpp @ 1930:2d26b0046e0d
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Tue, 30 Nov 2010 14:53:30 +0100 |
parents | d5d065957597 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1484:6b7001391c97 | 1930:2d26b0046e0d |
---|---|
1 /* | 1 /* |
2 * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. 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. |
14 * | 14 * |
15 * You should have received a copy of the GNU General Public License version | 15 * You should have received a copy of the GNU General Public License version |
16 * 2 along with this work; if not, write to the Free Software Foundation, | 16 * 2 along with this work; if not, write to the Free Software Foundation, |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 * | 18 * |
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * CA 95054 USA or visit www.sun.com if you need additional information or | 20 * or visit www.oracle.com if you need additional information or have any |
21 * have any questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "incls/_precompiled.incl" | 25 #include "incls/_precompiled.incl" |
26 #include "incls/_ciMethodData.cpp.incl" | 26 #include "incls/_ciMethodData.cpp.incl" |
35 Copy::zero_to_words((HeapWord*) &_orig, sizeof(_orig) / sizeof(HeapWord)); | 35 Copy::zero_to_words((HeapWord*) &_orig, sizeof(_orig) / sizeof(HeapWord)); |
36 _data = NULL; | 36 _data = NULL; |
37 _data_size = 0; | 37 _data_size = 0; |
38 _extra_data_size = 0; | 38 _extra_data_size = 0; |
39 _current_mileage = 0; | 39 _current_mileage = 0; |
40 _invocation_counter = 0; | |
41 _backedge_counter = 0; | |
40 _state = empty_state; | 42 _state = empty_state; |
41 _saw_free_extra_data = false; | 43 _saw_free_extra_data = false; |
42 // Set an initial hint. Don't use set_hint_di() because | 44 // Set an initial hint. Don't use set_hint_di() because |
43 // first_di() may be out of bounds if data_size is 0. | 45 // first_di() may be out of bounds if data_size is 0. |
44 _hint_di = first_di(); | 46 _hint_di = first_di(); |
54 Copy::zero_to_words((HeapWord*) &_orig, sizeof(_orig) / sizeof(HeapWord)); | 56 Copy::zero_to_words((HeapWord*) &_orig, sizeof(_orig) / sizeof(HeapWord)); |
55 _data = NULL; | 57 _data = NULL; |
56 _data_size = 0; | 58 _data_size = 0; |
57 _extra_data_size = 0; | 59 _extra_data_size = 0; |
58 _current_mileage = 0; | 60 _current_mileage = 0; |
61 _invocation_counter = 0; | |
62 _backedge_counter = 0; | |
59 _state = empty_state; | 63 _state = empty_state; |
60 _saw_free_extra_data = false; | 64 _saw_free_extra_data = false; |
61 // Set an initial hint. Don't use set_hint_di() because | 65 // Set an initial hint. Don't use set_hint_di() because |
62 // first_di() may be out of bounds if data_size is 0. | 66 // first_di() may be out of bounds if data_size is 0. |
63 _hint_di = first_di(); | 67 _hint_di = first_di(); |
97 ci_data = next_data(ci_data); | 101 ci_data = next_data(ci_data); |
98 data = mdo->next_data(data); | 102 data = mdo->next_data(data); |
99 } | 103 } |
100 // Note: Extra data are all BitData, and do not need translation. | 104 // Note: Extra data are all BitData, and do not need translation. |
101 _current_mileage = methodDataOopDesc::mileage_of(mdo->method()); | 105 _current_mileage = methodDataOopDesc::mileage_of(mdo->method()); |
106 _invocation_counter = mdo->invocation_count(); | |
107 _backedge_counter = mdo->backedge_count(); | |
102 _state = mdo->is_mature()? mature_state: immature_state; | 108 _state = mdo->is_mature()? mature_state: immature_state; |
103 | 109 |
104 _eflags = mdo->eflags(); | 110 _eflags = mdo->eflags(); |
105 _arg_local = mdo->arg_local(); | 111 _arg_local = mdo->arg_local(); |
106 _arg_stack = mdo->arg_stack(); | 112 _arg_stack = mdo->arg_stack(); |
251 mdo->set_arg_modified(i, arg_modified(i)); | 257 mdo->set_arg_modified(i, arg_modified(i)); |
252 } | 258 } |
253 } | 259 } |
254 } | 260 } |
255 | 261 |
262 void ciMethodData::set_compilation_stats(short loops, short blocks) { | |
263 VM_ENTRY_MARK; | |
264 methodDataOop mdo = get_methodDataOop(); | |
265 if (mdo != NULL) { | |
266 mdo->set_num_loops(loops); | |
267 mdo->set_num_blocks(blocks); | |
268 } | |
269 } | |
270 | |
271 void ciMethodData::set_would_profile(bool p) { | |
272 VM_ENTRY_MARK; | |
273 methodDataOop mdo = get_methodDataOop(); | |
274 if (mdo != NULL) { | |
275 mdo->set_would_profile(p); | |
276 } | |
277 } | |
278 | |
256 bool ciMethodData::has_escape_info() { | 279 bool ciMethodData::has_escape_info() { |
257 return eflag_set(methodDataOopDesc::estimated); | 280 return eflag_set(methodDataOopDesc::estimated); |
258 } | 281 } |
259 | 282 |
260 void ciMethodData::set_eflag(methodDataOopDesc::EscapeFlag f) { | 283 void ciMethodData::set_eflag(methodDataOopDesc::EscapeFlag f) { |