comparison src/share/vm/oops/methodOop.hpp @ 4970:33df1aeaebbf

Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 27 Feb 2012 13:10:13 +0100
parents 7604c69a6301 0382d2b469b2
children 5e9f38419819
comparison
equal deleted inserted replaced
4703:2cfb7fb2dce7 4970:33df1aeaebbf
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, 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.
75 // | result_index (C++ interpreter only) | 75 // | result_index (C++ interpreter only) |
76 // |------------------------------------------------------| 76 // |------------------------------------------------------|
77 // | method_size | max_stack | 77 // | method_size | max_stack |
78 // | max_locals | size_of_parameters | 78 // | max_locals | size_of_parameters |
79 // |------------------------------------------------------| 79 // |------------------------------------------------------|
80 // | intrinsic_id, (unused) | throwout_count | 80 // |intrinsic_id| flags | throwout_count |
81 // |------------------------------------------------------| 81 // |------------------------------------------------------|
82 // | num_breakpoints | (unused) | 82 // | num_breakpoints | (unused) |
83 // |------------------------------------------------------| 83 // |------------------------------------------------------|
84 // | invocation_counter | 84 // | invocation_counter |
85 // | backedge_counter | 85 // | backedge_counter |
122 u2 _method_size; // size of this object 122 u2 _method_size; // size of this object
123 u2 _max_stack; // Maximum number of entries on the expression stack 123 u2 _max_stack; // Maximum number of entries on the expression stack
124 u2 _max_locals; // Number of local variables used by this method 124 u2 _max_locals; // Number of local variables used by this method
125 u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words 125 u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words
126 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) 126 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
127 u1 _jfr_towrite : 1, // Flags
128 : 7;
127 u2 _interpreter_throwout_count; // Count of times method was exited via exception while interpreting 129 u2 _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
128 u2 _number_of_breakpoints; // fullspeed debugging support 130 u2 _number_of_breakpoints; // fullspeed debugging support
129 InvocationCounter _invocation_counter; // Incremented before each activation of the method - used to trigger frequency-based optimizations 131 InvocationCounter _invocation_counter; // Incremented before each activation of the method - used to trigger frequency-based optimizations
130 InvocationCounter _backedge_counter; // Incremented before each backedge taken - used to trigger frequencey-based optimizations 132 InvocationCounter _backedge_counter; // Incremented before each backedge taken - used to trigger frequencey-based optimizations
131 133
225 void decr_number_of_breakpoints() { --_number_of_breakpoints; } 227 void decr_number_of_breakpoints() { --_number_of_breakpoints; }
226 // Initialization only 228 // Initialization only
227 void clear_number_of_breakpoints() { _number_of_breakpoints = 0; } 229 void clear_number_of_breakpoints() { _number_of_breakpoints = 0; }
228 230
229 // index into instanceKlass methods() array 231 // index into instanceKlass methods() array
232 // note: also used by jfr
230 u2 method_idnum() const { return constMethod()->method_idnum(); } 233 u2 method_idnum() const { return constMethod()->method_idnum(); }
231 void set_method_idnum(u2 idnum) { constMethod()->set_method_idnum(idnum); } 234 void set_method_idnum(u2 idnum) { constMethod()->set_method_idnum(idnum); }
232 235
233 // code size 236 // code size
234 int code_size() const { return constMethod()->code_size(); } 237 int code_size() const { return constMethod()->code_size(); }
404 // native function (used for native methods only) 407 // native function (used for native methods only)
405 enum { 408 enum {
406 native_bind_event_is_interesting = true 409 native_bind_event_is_interesting = true
407 }; 410 };
408 address native_function() const { return *(native_function_addr()); } 411 address native_function() const { return *(native_function_addr()); }
412 address critical_native_function();
413
409 // Must specify a real function (not NULL). 414 // Must specify a real function (not NULL).
410 // Use clear_native_function() to unregister. 415 // Use clear_native_function() to unregister.
411 void set_native_function(address function, bool post_event_flag); 416 void set_native_function(address function, bool post_event_flag);
412 bool has_native_function() const; 417 bool has_native_function() const;
413 void clear_native_function(); 418 void clear_native_function();
654 659
655 // Helper routines for intrinsic_id() and vmIntrinsics::method(). 660 // Helper routines for intrinsic_id() and vmIntrinsics::method().
656 void init_intrinsic_id(); // updates from _none if a match 661 void init_intrinsic_id(); // updates from _none if a match
657 static vmSymbols::SID klass_id_for_intrinsics(klassOop holder); 662 static vmSymbols::SID klass_id_for_intrinsics(klassOop holder);
658 663
664 bool jfr_towrite() { return _jfr_towrite; }
665 void set_jfr_towrite(bool towrite) { _jfr_towrite = towrite; }
666
659 // On-stack replacement support 667 // On-stack replacement support
660 bool has_osr_nmethod(int level, bool match_level) { 668 bool has_osr_nmethod(int level, bool match_level) {
661 return instanceKlass::cast(method_holder())->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; 669 return instanceKlass::cast(method_holder())->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL;
662 } 670 }
663 671