Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, 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
Expand Down Expand Up @@ -37,7 +37,7 @@
* Test scenario:
* - during initialization (from function Agent_OnAttach) agent starts auxiliary thread waiting on
* raw monitor and enables GarbageCollectionStart and GarbageCollectionFinish events
* - target application provokes garbage collection (calls System.gc())
* - target application provokes garbage collection (calls WhiteBox.getWhiteBox().fullGC())
* - agent receives event GarbageCollectionStart
* - agent receives event GarbageCollectionFinish event and notifies waiting auxiliary thread
* - notified auxiliary thread notifies target application that agent finished its work
Expand All @@ -48,11 +48,13 @@
* /test/lib
* @build nsk.share.aod.AODTestRunner
* nsk.jvmti.AttachOnDemand.attach020.attach020Target
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/native
* nsk.share.aod.AODTestRunner
* -jdk ${test.jdk}
* -target nsk.jvmti.AttachOnDemand.attach020.attach020Target
* -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}"
* -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
* -na attach020Agent00
*/

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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
Expand All @@ -22,14 +22,14 @@
*/
package nsk.jvmti.AttachOnDemand.attach020;

import nsk.share.ClassUnloader;
import nsk.share.aod.TargetApplicationWaitingAgents;
import jdk.test.whitebox.WhiteBox;

public class attach020Target extends TargetApplicationWaitingAgents {

protected void targetApplicationActions() {
log.display("Provoking garbage collection");
ClassUnloader.eatMemory();
WhiteBox.getWhiteBox().fullGC();
}

public static void main(String[] args) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, 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
Expand Down Expand Up @@ -44,11 +44,13 @@
* /test/lib
* @build nsk.share.aod.AODTestRunner
* nsk.jvmti.AttachOnDemand.attach021.attach021Target
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/native
* nsk.share.aod.AODTestRunner
* -jdk ${test.jdk}
* -target nsk.jvmti.AttachOnDemand.attach021.attach021Target
* -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}"
* -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
* -na attach021Agent00
*/

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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
Expand All @@ -22,8 +22,8 @@
*/
package nsk.jvmti.AttachOnDemand.attach021;

import nsk.share.ClassUnloader;
import nsk.share.aod.TargetApplicationWaitingAgents;
import jdk.test.whitebox.WhiteBox;

public class attach021Target extends TargetApplicationWaitingAgents {

Expand Down Expand Up @@ -51,7 +51,7 @@ protected void targetApplicationActions() throws Throwable {
try {
if (createTaggedObject()) {
log.display("Provoking GC");
ClassUnloader.eatMemory();
WhiteBox.getWhiteBox().fullGC();
}
} finally {
shutdownAgent();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, 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
Expand Down Expand Up @@ -47,11 +47,13 @@
* /test/lib
* @build nsk.share.aod.AODTestRunner
* nsk.jvmti.AttachOnDemand.attach022.attach022Target
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/native
* nsk.share.aod.AODTestRunner
* -jdk ${test.jdk}
* -target nsk.jvmti.AttachOnDemand.attach022.attach022Target
* -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}"
* -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
* -na attach022Agent00
*/

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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
Expand All @@ -22,8 +22,8 @@
*/
package nsk.jvmti.AttachOnDemand.attach022;

import nsk.share.ClassUnloader;
import nsk.share.aod.TargetApplicationWaitingAgents;
import jdk.test.whitebox.WhiteBox;

class ClassForAllocationEventsTest {

Expand All @@ -47,7 +47,7 @@ protected void targetApplicationActions() throws Throwable {
}

log.display("Provoking GC");
ClassUnloader.eatMemory();
WhiteBox.getWhiteBox().fullGC();
} finally {
if (!shutdownAgent(TEST_ALLOCATION_NUMBER)) {
setStatusFailed("Error happened during agent work, see error messages for details");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, 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
Expand Down Expand Up @@ -27,6 +27,7 @@
import java.math.*;

import nsk.share.*;
import jdk.test.whitebox.WhiteBox;

/**
* This test exercises the JVMTI event <code>GarbageCollectionFinish</code>.
Expand Down Expand Up @@ -63,7 +64,7 @@ public static int run(String argv[], PrintStream out) {
private int runThis(String argv[], PrintStream out) {
try {
for (int i=0; i<ITERATIONS; i++)
ClassUnloader.eatMemory(); // provoke garbage collecting
WhiteBox.getWhiteBox().fullGC(); // provoke garbage collecting
} catch (OutOfMemoryError e) {
// ignoring
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, 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
Expand Down Expand Up @@ -40,8 +40,11 @@
*
* @library /vmTestbase
* /test/lib
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/native
* -XX:-UseGCOverheadLimit
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -agentlib:gcfinish001=-waittime=5
* nsk.jvmti.GarbageCollectionFinish.gcfinish001
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, 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
Expand Down Expand Up @@ -27,6 +27,7 @@
import java.math.*;

import nsk.share.*;
import jdk.test.whitebox.WhiteBox;

/**
* This test exercises the JVMTI event <code>GarbageCollectionStart</code>.
Expand Down Expand Up @@ -63,13 +64,7 @@ public static int run(String argv[], PrintStream out) {
}

private int runThis(String argv[], PrintStream out) {
try {
for (int i=0; i<ITERATIONS; i++)
ClassUnloader.eatMemory(); // provoke garbage collecting
} catch (OutOfMemoryError e) {
// ignoring
}

WhiteBox.getWhiteBox().fullGC(); // provoke garbage collecting
return Consts.TEST_PASSED;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, 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
Expand Down Expand Up @@ -40,8 +40,11 @@
*
* @library /vmTestbase
* /test/lib
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/native
* -XX:-UseGCOverheadLimit
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -agentlib:gcstart001=-waittime=5
* nsk.jvmti.GarbageCollectionStart.gcstart001
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, 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
Expand Down Expand Up @@ -27,6 +27,7 @@
import java.math.*;

import nsk.share.*;
import jdk.test.whitebox.WhiteBox;

/**
* This test exercises the JVMTI event <code>GarbageCollectionStart</code>.
Expand Down Expand Up @@ -61,13 +62,7 @@ public static int run(String argv[], PrintStream out) {
}

private int runThis(String argv[], PrintStream out) {
try {
for (int i=0; i<ITERATIONS; i++)
ClassUnloader.eatMemory(); // provoke garbage collecting
} catch (OutOfMemoryError e) {
// ignoring
}

WhiteBox.getWhiteBox().fullGC(); // provoke garbage collecting
return Consts.TEST_PASSED;
}
}
Loading