comparison src/share/vm/runtime/thread.hpp @ 1213:6deeaebad47a

6902182: 4/4 Starting with jdwp agent should not incur performance penalty Summary: Rename can_post_exceptions support to can_post_on_exceptions. Add support for should_post_on_exceptions flag to permit per JavaThread optimizations. Reviewed-by: never, kvn, dcubed Contributed-by: tom.deneau@amd.com
author dcubed
date Mon, 01 Feb 2010 17:35:05 -0700
parents 9b9c1ee9b3f6
children 93767e6a2dfd
comparison
equal deleted inserted replaced
1196:f3345b7b01b4 1213:6deeaebad47a
1 /* 1 /*
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2010 Sun Microsystems, Inc. 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.
1191 static ByteSize is_method_handle_exception_offset() { return byte_offset_of(JavaThread, _is_method_handle_exception); } 1191 static ByteSize is_method_handle_exception_offset() { return byte_offset_of(JavaThread, _is_method_handle_exception); }
1192 static ByteSize stack_guard_state_offset() { return byte_offset_of(JavaThread, _stack_guard_state ); } 1192 static ByteSize stack_guard_state_offset() { return byte_offset_of(JavaThread, _stack_guard_state ); }
1193 static ByteSize suspend_flags_offset() { return byte_offset_of(JavaThread, _suspend_flags ); } 1193 static ByteSize suspend_flags_offset() { return byte_offset_of(JavaThread, _suspend_flags ); }
1194 1194
1195 static ByteSize do_not_unlock_if_synchronized_offset() { return byte_offset_of(JavaThread, _do_not_unlock_if_synchronized); } 1195 static ByteSize do_not_unlock_if_synchronized_offset() { return byte_offset_of(JavaThread, _do_not_unlock_if_synchronized); }
1196 static ByteSize should_post_on_exceptions_flag_offset() {
1197 return byte_offset_of(JavaThread, _should_post_on_exceptions_flag);
1198 }
1196 1199
1197 #ifndef SERIALGC 1200 #ifndef SERIALGC
1198 static ByteSize satb_mark_queue_offset() { return byte_offset_of(JavaThread, _satb_mark_queue); } 1201 static ByteSize satb_mark_queue_offset() { return byte_offset_of(JavaThread, _satb_mark_queue); }
1199 static ByteSize dirty_card_queue_offset() { return byte_offset_of(JavaThread, _dirty_card_queue); } 1202 static ByteSize dirty_card_queue_offset() { return byte_offset_of(JavaThread, _dirty_card_queue); }
1200 #endif // !SERIALGC 1203 #endif // !SERIALGC
1429 static ByteSize interp_only_mode_offset() { return byte_offset_of(JavaThread, _interp_only_mode); } 1432 static ByteSize interp_only_mode_offset() { return byte_offset_of(JavaThread, _interp_only_mode); }
1430 bool is_interp_only_mode() { return (_interp_only_mode != 0); } 1433 bool is_interp_only_mode() { return (_interp_only_mode != 0); }
1431 int get_interp_only_mode() { return _interp_only_mode; } 1434 int get_interp_only_mode() { return _interp_only_mode; }
1432 void increment_interp_only_mode() { ++_interp_only_mode; } 1435 void increment_interp_only_mode() { ++_interp_only_mode; }
1433 void decrement_interp_only_mode() { --_interp_only_mode; } 1436 void decrement_interp_only_mode() { --_interp_only_mode; }
1437
1438 // support for cached flag that indicates whether exceptions need to be posted for this thread
1439 // if this is false, we can avoid deoptimizing when events are thrown
1440 // this gets set to reflect whether jvmtiExport::post_exception_throw would actually do anything
1441 private:
1442 int _should_post_on_exceptions_flag;
1443
1444 public:
1445 int should_post_on_exceptions_flag() { return _should_post_on_exceptions_flag; }
1446 void set_should_post_on_exceptions_flag(int val) { _should_post_on_exceptions_flag = val; }
1434 1447
1435 private: 1448 private:
1436 ThreadStatistics *_thread_stat; 1449 ThreadStatistics *_thread_stat;
1437 1450
1438 public: 1451 public: