Skip to content

Commit 1115aaf

Browse files
committed
Revert "Add systemd slice framework"
This reverts commit d5b07b9.
1 parent da44f01 commit 1115aaf

File tree

10 files changed

+7
-516
lines changed

10 files changed

+7
-516
lines changed

src/hotspot/share/prims/whitebox.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,6 @@ class VM_WhiteBoxOperation : public VM_Operation {
158158
bool allow_nested_vm_operations() const { return true; }
159159
};
160160

161-
#ifdef LINUX
162-
class Whitebox_Linux : public os::Linux {
163-
public:
164-
static int host_cpus() { return os::Linux::active_processor_count(); }
165-
};
166-
#endif
167-
168161

169162
WB_ENTRY(jlong, WB_GetObjectAddress(JNIEnv* env, jobject o, jobject obj))
170163
return (jlong)(void*)JNIHandles::resolve(obj);
@@ -2495,12 +2488,6 @@ WB_ENTRY(jint, WB_ValidateCgroup(JNIEnv* env,
24952488
return ret;
24962489
WB_END
24972490

2498-
// Physical cpus of the host machine (including containers), Linux only.
2499-
WB_ENTRY(jint, WB_HostCPUs(JNIEnv* env, jobject o))
2500-
LINUX_ONLY(return Whitebox_Linux::host_cpus();)
2501-
return -1; // Not used/implemented on other platforms
2502-
WB_END
2503-
25042491
WB_ENTRY(void, WB_PrintOsInfo(JNIEnv* env, jobject o))
25052492
os::print_os_info(tty);
25062493
WB_END
@@ -2942,7 +2929,6 @@ static JNINativeMethod methods[] = {
29422929
(void*)&WB_ValidateCgroup },
29432930
{CC"hostPhysicalMemory", CC"()J", (void*)&WB_HostPhysicalMemory },
29442931
{CC"hostPhysicalSwap", CC"()J", (void*)&WB_HostPhysicalSwap },
2945-
{CC"hostCPUs", CC"()I", (void*)&WB_HostCPUs },
29462932
{CC"printOsInfo", CC"()V", (void*)&WB_PrintOsInfo },
29472933
{CC"disableElfSectionCache", CC"()V", (void*)&WB_DisableElfSectionCache },
29482934
{CC"resolvedMethodItemsCount", CC"()J", (void*)&WB_ResolvedMethodItemsCount },

test/hotspot/jtreg/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ applications/jcstress/copy.java 8229852 linux-all
118118
containers/docker/TestJcmd.java 8278102 linux-all
119119
containers/docker/TestMemoryAwareness.java 8303470 linux-all
120120
containers/docker/TestJFREvents.java 8327723 linux-x64
121-
containers/systemd/SystemdMemoryAwarenessTest.java 8322420 linux-all
122121

123122
#############################################################################
124123

test/hotspot/jtreg/TEST.ROOT

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ requires.properties= \
8787
vm.musl \
8888
vm.flagless \
8989
docker.support \
90-
systemd.support \
9190
jdk.containerized
9291

9392
# Minimum jtreg version

test/hotspot/jtreg/containers/systemd/HelloSystemd.java

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

test/hotspot/jtreg/containers/systemd/SystemdMemoryAwarenessTest.java

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

test/jdk/TEST.ROOT

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ requires.properties= \
101101
vm.jvmti \
102102
vm.cpu.features \
103103
docker.support \
104-
systemd.support \
105104
release.implementor \
106105
jdk.containerized \
107106
jdk.foreign.linker

test/jtreg-ext/requires/VMProps.java

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ public Map<String, String> call() {
133133
map.put("vm.compiler1.enabled", this::isCompiler1Enabled);
134134
map.put("vm.compiler2.enabled", this::isCompiler2Enabled);
135135
map.put("docker.support", this::dockerSupport);
136-
map.put("systemd.support", this::systemdSupport);
137136
map.put("vm.musl", this::isMusl);
138137
map.put("release.implementor", this::implementor);
139138
map.put("jdk.containerized", this::jdkContainerized);
@@ -611,7 +610,7 @@ protected String dockerSupport() {
611610

612611
if (isSupported) {
613612
try {
614-
isSupported = checkProgramSupport("checkDockerSupport()", Container.ENGINE_COMMAND);
613+
isSupported = checkDockerSupport();
615614
} catch (Exception e) {
616615
isSupported = false;
617616
}
@@ -621,27 +620,6 @@ protected String dockerSupport() {
621620
return "" + isSupported;
622621
}
623622

624-
/**
625-
* A simple check for systemd support
626-
*
627-
* @return true if systemd is supported in a given environment
628-
*/
629-
protected String systemdSupport() {
630-
log("Entering systemdSupport()");
631-
632-
boolean isSupported = Platform.isLinux();
633-
if (isSupported) {
634-
try {
635-
isSupported = checkProgramSupport("checkSystemdSupport()", "systemd-run");
636-
} catch (Exception e) {
637-
isSupported = false;
638-
}
639-
}
640-
641-
log("systemdSupport(): returning isSupported = " + isSupported);
642-
return "" + isSupported;
643-
}
644-
645623
// Configures process builder to redirect process stdout and stderr to a file.
646624
// Returns file names for stdout and stderr.
647625
private Map<String, String> redirectOutputToLogFile(String msg, ProcessBuilder pb, String fileNameBase) {
@@ -676,17 +654,17 @@ private void printLogfileContent(Map<String, String> logFileNames) {
676654
});
677655
}
678656

679-
private boolean checkProgramSupport(String logString, String cmd) throws IOException, InterruptedException {
680-
log(logString + ": entering");
681-
ProcessBuilder pb = new ProcessBuilder("which", cmd);
657+
private boolean checkDockerSupport() throws IOException, InterruptedException {
658+
log("checkDockerSupport(): entering");
659+
ProcessBuilder pb = new ProcessBuilder("which", Container.ENGINE_COMMAND);
682660
Map<String, String> logFileNames =
683-
redirectOutputToLogFile(logString + ": which " + cmd,
684-
pb, "which-cmd");
661+
redirectOutputToLogFile("checkDockerSupport(): which " + Container.ENGINE_COMMAND,
662+
pb, "which-container");
685663
Process p = pb.start();
686664
p.waitFor(10, TimeUnit.SECONDS);
687665
int exitValue = p.exitValue();
688666

689-
log(String.format("%s: exitValue = %s, pid = %s", logString, exitValue, p.pid()));
667+
log(String.format("checkDockerSupport(): exitValue = %s, pid = %s", exitValue, p.pid()));
690668
if (exitValue != 0) {
691669
printLogfileContent(logFileNames);
692670
}

test/lib/jdk/test/lib/containers/systemd/SystemdRunOptions.java

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

0 commit comments

Comments
 (0)