< prev index next >

src/share/vm/runtime/objectMonitor.cpp

Print this page
rev 8910 : full patch for jfr

*** 1,7 **** /* ! * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 463,474 **** // event handler consumed an unpark() issued by the thread that // just exited the monitor. } if (event.should_commit()) { ! event.set_klass(((oop)this->object())->klass()); ! event.set_previousOwner((TYPE_JAVALANGTHREAD)_previous_owner_tid); event.set_address((TYPE_ADDRESS)(uintptr_t)(this->object_addr())); event.commit(); } if (ObjectMonitor::_sync_ContendedLockAttempts != NULL) { --- 463,474 ---- // event handler consumed an unpark() issued by the thread that // just exited the monitor. } if (event.should_commit()) { ! event.set_monitorClass(((oop)this->object())->klass()); ! event.set_previousOwner((TYPE_THREAD)_previous_owner_tid); event.set_address((TYPE_ADDRESS)(uintptr_t)(this->object_addr())); event.commit(); } if (ObjectMonitor::_sync_ContendedLockAttempts != NULL) {
*** 992,1002 **** #if INCLUDE_TRACE // get the owner's thread id for the MonitorEnter event // if it is enabled and the thread isn't suspended if (not_suspended && Tracing::is_event_enabled(TraceJavaMonitorEnterEvent)) { ! _previous_owner_tid = SharedRuntime::get_java_tid(Self); } #endif for (;;) { assert (THREAD == _owner, "invariant") ; --- 992,1002 ---- #if INCLUDE_TRACE // get the owner's thread id for the MonitorEnter event // if it is enabled and the thread isn't suspended if (not_suspended && Tracing::is_event_enabled(TraceJavaMonitorEnterEvent)) { ! _previous_owner_tid = THREAD_TRACE_ID(Self); } #endif for (;;) { assert (THREAD == _owner, "invariant") ;
*** 1445,1459 **** // helper method for posting a monitor wait event void ObjectMonitor::post_monitor_wait_event(EventJavaMonitorWait* event, jlong notifier_tid, jlong timeout, bool timedout) { ! event->set_klass(((oop)this->object())->klass()); ! event->set_timeout((TYPE_ULONG)timeout); ! event->set_address((TYPE_ADDRESS)(uintptr_t)(this->object_addr())); ! event->set_notifier((TYPE_OSTHREAD)notifier_tid); ! event->set_timedOut((TYPE_BOOLEAN)timedout); event->commit(); } // ----------------------------------------------------------------------------- // Wait/Notify/NotifyAll --- 1445,1460 ---- // helper method for posting a monitor wait event void ObjectMonitor::post_monitor_wait_event(EventJavaMonitorWait* event, jlong notifier_tid, jlong timeout, bool timedout) { ! assert(event != NULL, "invariant"); ! event->set_monitorClass(((oop)this->object())->klass()); ! event->set_timeout(timeout); ! event->set_address((TYPE_ADDRESS)this->object_addr()); ! event->set_notifier(notifier_tid); ! event->set_timedOut(timedout); event->commit(); } // ----------------------------------------------------------------------------- // Wait/Notify/NotifyAll
*** 1714,1724 **** if (Policy != 4) { iterator->TState = ObjectWaiter::TS_ENTER ; } iterator->_notified = 1 ; Thread * Self = THREAD; ! iterator->_notifier_tid = Self->osthread()->thread_id(); ObjectWaiter * List = _EntryList ; if (List != NULL) { assert (List->_prev == NULL, "invariant") ; assert (List->TState == ObjectWaiter::TS_ENTER, "invariant") ; --- 1715,1725 ---- if (Policy != 4) { iterator->TState = ObjectWaiter::TS_ENTER ; } iterator->_notified = 1 ; Thread * Self = THREAD; ! iterator->_notifier_tid = THREAD_TRACE_ID(Self); ObjectWaiter * List = _EntryList ; if (List != NULL) { assert (List->_prev == NULL, "invariant") ; assert (List->TState == ObjectWaiter::TS_ENTER, "invariant") ;
*** 1840,1850 **** guarantee (iterator->TState == ObjectWaiter::TS_WAIT, "invariant") ; guarantee (iterator->_notified == 0, "invariant") ; iterator->_notified = 1 ; Thread * Self = THREAD; ! iterator->_notifier_tid = Self->osthread()->thread_id(); if (Policy != 4) { iterator->TState = ObjectWaiter::TS_ENTER ; } ObjectWaiter * List = _EntryList ; --- 1841,1851 ---- guarantee (iterator->TState == ObjectWaiter::TS_WAIT, "invariant") ; guarantee (iterator->_notified == 0, "invariant") ; iterator->_notified = 1 ; Thread * Self = THREAD; ! iterator->_notifier_tid = THREAD_TRACE_ID(Self); if (Policy != 4) { iterator->TState = ObjectWaiter::TS_ENTER ; } ObjectWaiter * List = _EntryList ;
< prev index next >