Mercurial > hg > graal-compiler
comparison src/share/vm/oops/methodData.hpp @ 8124:5fc51c1ecdeb
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 05 Mar 2013 23:44:54 +0100 |
parents | 5d0bb7d52783 d05ff4bf41b3 |
children | 6c4db417385a |
comparison
equal
deleted
inserted
replaced
7943:a413bcd552a4 | 8124:5fc51c1ecdeb |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 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. |
30 #include "oops/method.hpp" | 30 #include "oops/method.hpp" |
31 #include "oops/oop.hpp" | 31 #include "oops/oop.hpp" |
32 #include "runtime/orderAccess.hpp" | 32 #include "runtime/orderAccess.hpp" |
33 | 33 |
34 class BytecodeStream; | 34 class BytecodeStream; |
35 class KlassSizeStats; | |
35 | 36 |
36 // The MethodData object collects counts and other profile information | 37 // The MethodData object collects counts and other profile information |
37 // during zeroth-tier (interpretive) and first-tier execution. | 38 // during zeroth-tier (interpretive) and first-tier execution. |
38 // The profile is used later by compilation heuristics. Some heuristics | 39 // The profile is used later by compilation heuristics. Some heuristics |
39 // enable use of aggressive (or "heroic") optimizations. An aggressive | 40 // enable use of aggressive (or "heroic") optimizations. An aggressive |
1299 void initialize(methodHandle method); | 1300 void initialize(methodHandle method); |
1300 | 1301 |
1301 // My size | 1302 // My size |
1302 int size_in_bytes() const { return _size; } | 1303 int size_in_bytes() const { return _size; } |
1303 int size() const { return align_object_size(align_size_up(_size, BytesPerWord)/BytesPerWord); } | 1304 int size() const { return align_object_size(align_size_up(_size, BytesPerWord)/BytesPerWord); } |
1305 #if INCLUDE_SERVICES | |
1306 void collect_statistics(KlassSizeStats *sz) const; | |
1307 #endif | |
1304 | 1308 |
1305 int creation_mileage() const { return _creation_mileage; } | 1309 int creation_mileage() const { return _creation_mileage; } |
1306 void set_creation_mileage(int x) { _creation_mileage = x; } | 1310 void set_creation_mileage(int x) { _creation_mileage = x; } |
1307 | 1311 |
1308 int invocation_count() { | 1312 int invocation_count() { |
1469 _nof_overflow_recompiles += 1; | 1473 _nof_overflow_recompiles += 1; |
1470 } | 1474 } |
1471 uint decompile_count() const { | 1475 uint decompile_count() const { |
1472 return _nof_decompiles; | 1476 return _nof_decompiles; |
1473 } | 1477 } |
1474 void inc_decompile_count(); | 1478 void inc_decompile_count() { |
1479 _nof_decompiles += 1; | |
1480 if (decompile_count() > (uint)PerMethodRecompilationCutoff) { | |
1481 method()->set_not_compilable(CompLevel_full_optimization, true, "decompile_count > PerMethodRecompilationCutoff"); | |
1482 } | |
1483 } | |
1475 | 1484 |
1476 // Support for code generation | 1485 // Support for code generation |
1477 static ByteSize data_offset() { | 1486 static ByteSize data_offset() { |
1478 return byte_offset_of(MethodData, _data[0]); | 1487 return byte_offset_of(MethodData, _data[0]); |
1479 } | 1488 } |