Skip to content

Commit 5febc4e

Browse files
committed
8365910: [BACKOUT] Add a compilation timeout flag to catch long running compilations
Reviewed-by: chagedorn, dholmes
1 parent a7c0f4b commit 5febc4e

File tree

8 files changed

+3
-282
lines changed

8 files changed

+3
-282
lines changed

src/hotspot/os/linux/compilerThreadTimeout_linux.cpp

Lines changed: 0 additions & 128 deletions
This file was deleted.

src/hotspot/os/linux/compilerThreadTimeout_linux.hpp

Lines changed: 0 additions & 51 deletions
This file was deleted.

src/hotspot/os/linux/globals_linux.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@
8989
product(bool, PrintMemoryMapAtExit, false, DIAGNOSTIC, \
9090
"Print an annotated memory map at exit") \
9191
\
92-
develop(intx, CompileTaskTimeout, 0, \
93-
"Set the timeout for compile tasks' CPU time in milliseconds."\
94-
" 0 = no timeout (default)") \
95-
range(0,1000000) \
96-
\
9792
// end of RUNTIME_OS_FLAGS
9893

9994
//

src/hotspot/share/compiler/compileBroker.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ CompileTaskWrapper::CompileTaskWrapper(CompileTask* task) {
218218
CompilerThread* thread = CompilerThread::current();
219219
thread->set_task(task);
220220
CompileLog* log = thread->log();
221-
thread->timeout()->arm();
222221
if (log != nullptr && !task->is_unloaded()) task->log_task_start(log);
223222
}
224223

@@ -229,7 +228,6 @@ CompileTaskWrapper::~CompileTaskWrapper() {
229228
if (log != nullptr && !task->is_unloaded()) task->log_task_done(log);
230229
thread->set_task(nullptr);
231230
thread->set_env(nullptr);
232-
thread->timeout()->disarm();
233231
if (task->is_blocking()) {
234232
bool free_task = false;
235233
{
@@ -1927,10 +1925,6 @@ void CompileBroker::compiler_thread_loop() {
19271925
log->end_elem();
19281926
}
19291927

1930-
if (!thread->init_compilation_timeout()) {
1931-
return;
1932-
}
1933-
19341928
// If compiler thread/runtime initialization fails, exit the compiler thread
19351929
if (!init_compiler_runtime()) {
19361930
return;

src/hotspot/share/compiler/compilerThread.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ CompilerThread::CompilerThread(CompileQueue* queue,
4040
_can_call_java = false;
4141
_compiler = nullptr;
4242
_arena_stat = nullptr;
43-
_timeout = nullptr;
4443

4544
#ifndef PRODUCT
4645
_ideal_graph_printer = nullptr;
@@ -50,7 +49,6 @@ CompilerThread::CompilerThread(CompileQueue* queue,
5049
CompilerThread::~CompilerThread() {
5150
// Delete objects which were allocated on heap.
5251
delete _counters;
53-
delete _timeout;
5452
// arenastat should have been deleted at the end of the compilation
5553
assert(_arena_stat == nullptr, "Should be null");
5654
}

src/hotspot/share/compiler/compilerThread.hpp

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@
2525
#ifndef SHARE_COMPILER_COMPILERTHREAD_HPP
2626
#define SHARE_COMPILER_COMPILERTHREAD_HPP
2727

28-
#include "memory/allocation.hpp"
29-
#include "nmt/memTag.hpp"
3028
#include "runtime/javaThread.hpp"
31-
#include "utilities/macros.hpp"
32-
33-
#ifdef LINUX
34-
#include "compilerThreadTimeout_linux.hpp"
35-
#endif //LINUX
3629

3730
class AbstractCompiler;
3831
class ArenaStatCounter;
@@ -45,27 +38,10 @@ class CompileQueue;
4538
class CompilerCounters;
4639
class IdealGraphPrinter;
4740

48-
#ifndef LINUX
49-
class CompilerThreadTimeoutGeneric : public CHeapObj<mtCompiler> {
50-
public:
51-
CompilerThreadTimeoutGeneric() {};
52-
void arm() {};
53-
void disarm() {};
54-
bool init_timeout() { return true; };
55-
};
56-
#endif // !LINUX
57-
5841
// A thread used for Compilation.
5942
class CompilerThread : public JavaThread {
6043
friend class VMStructs;
6144
JVMCI_ONLY(friend class CompilerThreadCanCallJava;)
62-
63-
#ifdef LINUX
64-
typedef CompilerThreadTimeoutLinux Timeout;
65-
#else // LINUX
66-
typedef CompilerThreadTimeoutGeneric Timeout;
67-
#endif // LINUX
68-
6945
private:
7046
CompilerCounters* _counters;
7147

@@ -81,7 +57,6 @@ class CompilerThread : public JavaThread {
8157

8258
ArenaStatCounter* _arena_stat;
8359

84-
Timeout* _timeout;
8560
public:
8661

8762
static CompilerThread* current() {
@@ -138,13 +113,7 @@ class CompilerThread : public JavaThread {
138113
public:
139114
IdealGraphPrinter *ideal_graph_printer() { return _ideal_graph_printer; }
140115
void set_ideal_graph_printer(IdealGraphPrinter *n) { _ideal_graph_printer = n; }
141-
#endif // !PRODUCT
142-
143-
Timeout* timeout() const { return _timeout; };
144-
bool init_compilation_timeout() {
145-
_timeout = new Timeout();
146-
return _timeout->init_timeout();
147-
};
116+
#endif
148117

149118
// Get/set the thread's current task
150119
CompileTask* task() { return _task; }

test/hotspot/jtreg/compiler/arguments/TestCompileTaskTimeout.java

Lines changed: 0 additions & 56 deletions
This file was deleted.

test/hotspot/jtreg/runtime/signal/TestSigalrm.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424

2525
/*
2626
* @test
27-
* @requires os.family != "windows" & os.family != "aix" & vm.flagless
27+
* @requires os.family != "windows" & os.family != "aix"
2828
*
2929
* @summary converted from VM testbase runtime/signal/sigalrm01.
3030
* VM testbase keywords: [signal, runtime, linux, macosx]

0 commit comments

Comments
 (0)