mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8005849: JEP 167: Event-Based JVM Tracing
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com> Co-authored-by: Bengt Rutisson <bengt.rutisson@oracle.com> Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com> Co-authored-by: Erik Gahlin <erik.gahlin@oracle.com> Co-authored-by: Erik Helin <erik.helin@oracle.com> Co-authored-by: Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com> Co-authored-by: Keith McGuigan <keith.mcguigan@oracle.com> Co-authored-by: Mattias Tobiasson <mattias.tobiasson@oracle.com> Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com> Co-authored-by: Mikael Auno <mikael.auno@oracle.com> Co-authored-by: Nils Eliasson <nils.eliasson@oracle.com> Co-authored-by: Nils Loodin <nils.loodin@oracle.com> Co-authored-by: Rickard Backman <rickard.backman@oracle.com> Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com> Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com> Reviewed-by: acorn, coleenp, sla
This commit is contained in:
parent
6b2c468c35
commit
718f3252f6
195 changed files with 7628 additions and 1484 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2013, 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
|
||||
|
@ -29,7 +29,6 @@
|
|||
#include "runtime/park.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
|
||||
|
||||
// ObjectWaiter serves as a "proxy" or surrogate thread.
|
||||
// TODO-FIXME: Eliminate ObjectWaiter and use the thread-specific
|
||||
// ParkEvent instead. Beware, however, that the JVMTI code
|
||||
|
@ -43,6 +42,7 @@ class ObjectWaiter : public StackObj {
|
|||
ObjectWaiter * volatile _next;
|
||||
ObjectWaiter * volatile _prev;
|
||||
Thread* _thread;
|
||||
jlong _notifier_tid;
|
||||
ParkEvent * _event;
|
||||
volatile int _notified ;
|
||||
volatile TStates TState ;
|
||||
|
@ -55,6 +55,9 @@ class ObjectWaiter : public StackObj {
|
|||
void wait_reenter_end(ObjectMonitor *mon);
|
||||
};
|
||||
|
||||
// forward declaration to avoid include tracing.hpp
|
||||
class EventJavaMonitorWait;
|
||||
|
||||
// WARNING:
|
||||
// This is a very sensitive and fragile class. DO NOT make any
|
||||
// change unless you are fully aware of the underlying semantics.
|
||||
|
@ -151,6 +154,7 @@ class ObjectMonitor {
|
|||
_SpinFreq = 0 ;
|
||||
_SpinClock = 0 ;
|
||||
OwnerIsThread = 0 ;
|
||||
_previous_owner_tid = 0;
|
||||
}
|
||||
|
||||
~ObjectMonitor() {
|
||||
|
@ -192,7 +196,7 @@ public:
|
|||
|
||||
bool try_enter (TRAPS) ;
|
||||
void enter(TRAPS);
|
||||
void exit(TRAPS);
|
||||
void exit(bool not_suspended, TRAPS);
|
||||
void wait(jlong millis, bool interruptable, TRAPS);
|
||||
void notify(TRAPS);
|
||||
void notifyAll(TRAPS);
|
||||
|
@ -218,6 +222,10 @@ public:
|
|||
void ctAsserts () ;
|
||||
void ExitEpilog (Thread * Self, ObjectWaiter * Wakee) ;
|
||||
bool ExitSuspendEquivalent (JavaThread * Self) ;
|
||||
void post_monitor_wait_event(EventJavaMonitorWait * event,
|
||||
jlong notifier_tid,
|
||||
jlong timeout,
|
||||
bool timedout);
|
||||
|
||||
private:
|
||||
friend class ObjectSynchronizer;
|
||||
|
@ -240,6 +248,7 @@ public:
|
|||
|
||||
protected: // protected for jvmtiRawMonitor
|
||||
void * volatile _owner; // pointer to owning thread OR BasicLock
|
||||
volatile jlong _previous_owner_tid; // thread id of the previous owner of the monitor
|
||||
volatile intptr_t _recursions; // recursion count, 0 for first entry
|
||||
private:
|
||||
int OwnerIsThread ; // _owner is (Thread *) vs SP/BasicLock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue