mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8218753: Obsolete nonproduct flag ProfilerCheckIntervals
Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
038a979040
commit
560928deee
5 changed files with 10 additions and 50 deletions
|
@ -546,6 +546,7 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||||
{ "ProfileVM", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
{ "ProfileVM", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
||||||
{ "ProfileIntervals", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
{ "ProfileIntervals", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
||||||
{ "ProfileIntervalsTicks", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
{ "ProfileIntervalsTicks", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
||||||
|
{ "ProfilerCheckIntervals", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
||||||
{ "ProfilerNumberOfInterpretedMethods", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
{ "ProfilerNumberOfInterpretedMethods", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
||||||
{ "ProfilerNumberOfCompiledMethods", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
{ "ProfilerNumberOfCompiledMethods", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
||||||
{ "ProfilerNumberOfStubMethods", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
{ "ProfilerNumberOfStubMethods", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
|
||||||
|
|
|
@ -749,9 +749,6 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||||
product(bool, OmitStackTraceInFastThrow, true, \
|
product(bool, OmitStackTraceInFastThrow, true, \
|
||||||
"Omit backtraces for some 'hot' exceptions in optimized code") \
|
"Omit backtraces for some 'hot' exceptions in optimized code") \
|
||||||
\
|
\
|
||||||
notproduct(bool, ProfilerCheckIntervals, false, \
|
|
||||||
"Collect and print information on spacing of profiler ticks") \
|
|
||||||
\
|
|
||||||
product(bool, PrintWarnings, true, \
|
product(bool, PrintWarnings, true, \
|
||||||
"Print JVM warnings to output stream") \
|
"Print JVM warnings to output stream") \
|
||||||
\
|
\
|
||||||
|
|
|
@ -291,9 +291,6 @@ void print_statistics() {
|
||||||
if (TimeOopMap) {
|
if (TimeOopMap) {
|
||||||
GenerateOopMap::print_time();
|
GenerateOopMap::print_time();
|
||||||
}
|
}
|
||||||
if (ProfilerCheckIntervals) {
|
|
||||||
PeriodicTask::print_intervals();
|
|
||||||
}
|
|
||||||
if (PrintSymbolTableSizeHistogram) {
|
if (PrintSymbolTableSizeHistogram) {
|
||||||
SymbolTable::print_histogram();
|
SymbolTable::print_histogram();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,48 +31,20 @@
|
||||||
|
|
||||||
int PeriodicTask::_num_tasks = 0;
|
int PeriodicTask::_num_tasks = 0;
|
||||||
PeriodicTask* PeriodicTask::_tasks[PeriodicTask::max_tasks];
|
PeriodicTask* PeriodicTask::_tasks[PeriodicTask::max_tasks];
|
||||||
#ifndef PRODUCT
|
|
||||||
elapsedTimer PeriodicTask::_timer;
|
|
||||||
int PeriodicTask::_intervalHistogram[PeriodicTask::max_interval];
|
|
||||||
int PeriodicTask::_ticks;
|
|
||||||
|
|
||||||
void PeriodicTask::print_intervals() {
|
|
||||||
if (ProfilerCheckIntervals) {
|
|
||||||
for (int i = 0; i < PeriodicTask::max_interval; i++) {
|
|
||||||
int n = _intervalHistogram[i];
|
|
||||||
if (n > 0) tty->print_cr("%3d: %5d (%4.1f%%)", i, n, 100.0 * n / _ticks);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void PeriodicTask::real_time_tick(int delay_time) {
|
void PeriodicTask::real_time_tick(int delay_time) {
|
||||||
assert(Thread::current()->is_Watcher_thread(), "must be WatcherThread");
|
assert(Thread::current()->is_Watcher_thread(), "must be WatcherThread");
|
||||||
|
|
||||||
#ifndef PRODUCT
|
// The WatcherThread does not participate in the safepoint protocol
|
||||||
if (ProfilerCheckIntervals) {
|
// for the PeriodicTask_lock because it is not a JavaThread.
|
||||||
_ticks++;
|
MutexLockerEx ml(PeriodicTask_lock, Mutex::_no_safepoint_check_flag);
|
||||||
_timer.stop();
|
int orig_num_tasks = _num_tasks;
|
||||||
int ms = (int)_timer.milliseconds();
|
|
||||||
_timer.reset();
|
|
||||||
_timer.start();
|
|
||||||
if (ms >= PeriodicTask::max_interval) ms = PeriodicTask::max_interval - 1;
|
|
||||||
_intervalHistogram[ms]++;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
for(int index = 0; index < _num_tasks; index++) {
|
||||||
// The WatcherThread does not participate in the safepoint protocol
|
_tasks[index]->execute_if_pending(delay_time);
|
||||||
// for the PeriodicTask_lock because it is not a JavaThread.
|
if (_num_tasks < orig_num_tasks) { // task dis-enrolled itself
|
||||||
MutexLockerEx ml(PeriodicTask_lock, Mutex::_no_safepoint_check_flag);
|
index--; // re-do current slot as it has changed
|
||||||
int orig_num_tasks = _num_tasks;
|
orig_num_tasks = _num_tasks;
|
||||||
|
|
||||||
for(int index = 0; index < _num_tasks; index++) {
|
|
||||||
_tasks[index]->execute_if_pending(delay_time);
|
|
||||||
if (_num_tasks < orig_num_tasks) { // task dis-enrolled itself
|
|
||||||
index--; // re-do current slot as it has changed
|
|
||||||
orig_num_tasks = _num_tasks;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,13 +58,6 @@ class PeriodicTask: public CHeapObj<mtInternal> {
|
||||||
// Can only be called by the WatcherThread
|
// Can only be called by the WatcherThread
|
||||||
static void real_time_tick(int delay_time);
|
static void real_time_tick(int delay_time);
|
||||||
|
|
||||||
#ifndef PRODUCT
|
|
||||||
static elapsedTimer _timer; // measures time between ticks
|
|
||||||
static int _ticks; // total number of ticks
|
|
||||||
static int _intervalHistogram[max_interval]; // to check spacing of timer interrupts
|
|
||||||
public:
|
|
||||||
static void print_intervals();
|
|
||||||
#endif
|
|
||||||
// Only the WatcherThread can cause us to execute PeriodicTasks
|
// Only the WatcherThread can cause us to execute PeriodicTasks
|
||||||
friend class WatcherThread;
|
friend class WatcherThread;
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue