Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/interp_masm_x86_64.cpp @ 10105:aeaca88565e6
8010862: The Method counter fields used for profiling can be allocated lazily.
Summary: Allocate the method's profiling related metadata until they are needed.
Reviewed-by: coleenp, roland
author | jiangli |
---|---|
date | Tue, 09 Apr 2013 17:17:41 -0400 |
parents | f34d701e952e |
children | 836a62f43af9 d13d7aba8c12 |
comparison
equal
deleted
inserted
replaced
9055:dcdeb150988c | 10105:aeaca88565e6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2003, 2013, 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. |
267 shll(tmp, 2 + LogBytesPerWord); | 267 shll(tmp, 2 + LogBytesPerWord); |
268 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize)); | 268 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize)); |
269 // skip past the header | 269 // skip past the header |
270 addptr(cache, in_bytes(ConstantPoolCache::base_offset())); | 270 addptr(cache, in_bytes(ConstantPoolCache::base_offset())); |
271 addptr(cache, tmp); // construct pointer to cache entry | 271 addptr(cache, tmp); // construct pointer to cache entry |
272 } | |
273 | |
274 void InterpreterMacroAssembler::get_method_counters(Register method, | |
275 Register mcs, Label& skip) { | |
276 Label has_counters; | |
277 movptr(mcs, Address(method, Method::method_counters_offset())); | |
278 testptr(mcs, mcs); | |
279 jcc(Assembler::notZero, has_counters); | |
280 call_VM(noreg, CAST_FROM_FN_PTR(address, | |
281 InterpreterRuntime::build_method_counters), method); | |
282 movptr(mcs, Address(method,Method::method_counters_offset())); | |
283 testptr(mcs, mcs); | |
284 jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory | |
285 bind(has_counters); | |
272 } | 286 } |
273 | 287 |
274 // Load object from cpool->resolved_references(index) | 288 // Load object from cpool->resolved_references(index) |
275 void InterpreterMacroAssembler::load_resolved_reference_at_index( | 289 void InterpreterMacroAssembler::load_resolved_reference_at_index( |
276 Register result, Register index) { | 290 Register result, Register index) { |