Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/interp_masm_x86_32.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 | d13d7aba8c12 |
comparison
equal
deleted
inserted
replaced
9055:dcdeb150988c | 10105:aeaca88565e6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 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. |
264 // skip past the header | 264 // skip past the header |
265 addptr(cache, in_bytes(ConstantPoolCache::base_offset())); | 265 addptr(cache, in_bytes(ConstantPoolCache::base_offset())); |
266 addptr(cache, tmp); // construct pointer to cache entry | 266 addptr(cache, tmp); // construct pointer to cache entry |
267 } | 267 } |
268 | 268 |
269 void InterpreterMacroAssembler::get_method_counters(Register method, | |
270 Register mcs, Label& skip) { | |
271 Label has_counters; | |
272 movptr(mcs, Address(method, Method::method_counters_offset())); | |
273 testptr(mcs, mcs); | |
274 jcc(Assembler::notZero, has_counters); | |
275 call_VM(noreg, CAST_FROM_FN_PTR(address, | |
276 InterpreterRuntime::build_method_counters), method); | |
277 movptr(mcs, Address(method,Method::method_counters_offset())); | |
278 testptr(mcs, mcs); | |
279 jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory | |
280 bind(has_counters); | |
281 } | |
282 | |
269 // Load object from cpool->resolved_references(index) | 283 // Load object from cpool->resolved_references(index) |
270 void InterpreterMacroAssembler::load_resolved_reference_at_index( | 284 void InterpreterMacroAssembler::load_resolved_reference_at_index( |
271 Register result, Register index) { | 285 Register result, Register index) { |
272 assert_different_registers(result, index); | 286 assert_different_registers(result, index); |
273 // convert from field index to resolved_references() index and from | 287 // convert from field index to resolved_references() index and from |