test/hotspot/jtreg/runtime/appcds/javaldr/GCDuringDumpTransformer.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/test/hotspot/jtreg/runtime/appcds/javaldr/GCDuringDumpTransformer.java Wed Aug 22 09:26:40 2018
--- new/test/hotspot/jtreg/runtime/appcds/javaldr/GCDuringDumpTransformer.java Wed Aug 22 09:26:39 2018
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 2017, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 26,51 ****
--- 26,45 ----
import java.lang.instrument.Instrumentation;
import java.lang.instrument.IllegalClassFormatException;
import java.security.ProtectionDomain;
public class GCDuringDumpTransformer implements ClassFileTransformer {
static int n = 0;
public byte[] transform(ClassLoader loader, String name, Class<?> classBeingRedefined,
ProtectionDomain pd, byte[] buffer) throws IllegalClassFormatException {
n++;
System.out.println("dump time loading: " + name + " in loader: " + loader);
System.out.println("making garbage: " + n);
try {
makeGarbage();
} catch (Throwable t) {
t.printStackTrace();
try {
Thread.sleep(200); // let GC to have a chance to run
} catch (Throwable t2) {}
}
System.out.println("making garbage: done");
return null;
}
private static Instrumentation savedInstrumentation;
test/hotspot/jtreg/runtime/appcds/javaldr/GCDuringDumpTransformer.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File