8295879: JFR: Remove warnings in the jdk.jfr module
Reviewed-by: mgronlun
This commit is contained in:
parent
33ff80dd7a
commit
78454b69da
@ -26,14 +26,9 @@
|
||||
package jdk.jfr.events;
|
||||
|
||||
import jdk.jfr.Category;
|
||||
import jdk.jfr.DataAmount;
|
||||
import jdk.jfr.Description;
|
||||
import jdk.jfr.Enabled;
|
||||
import jdk.jfr.Label;
|
||||
import jdk.jfr.Name;
|
||||
import jdk.jfr.Period;
|
||||
import jdk.jfr.StackTrace;
|
||||
import jdk.jfr.Threshold;
|
||||
import jdk.jfr.Timespan;
|
||||
import jdk.jfr.internal.Type;
|
||||
|
||||
|
@ -26,14 +26,9 @@
|
||||
package jdk.jfr.events;
|
||||
|
||||
import jdk.jfr.Category;
|
||||
import jdk.jfr.DataAmount;
|
||||
import jdk.jfr.Description;
|
||||
import jdk.jfr.Enabled;
|
||||
import jdk.jfr.Label;
|
||||
import jdk.jfr.Name;
|
||||
import jdk.jfr.Period;
|
||||
import jdk.jfr.StackTrace;
|
||||
import jdk.jfr.Threshold;
|
||||
import jdk.jfr.Timespan;
|
||||
import jdk.jfr.internal.Type;
|
||||
|
||||
|
@ -28,12 +28,8 @@ package jdk.jfr.events;
|
||||
import jdk.jfr.Category;
|
||||
import jdk.jfr.DataAmount;
|
||||
import jdk.jfr.Description;
|
||||
import jdk.jfr.Enabled;
|
||||
import jdk.jfr.Label;
|
||||
import jdk.jfr.Name;
|
||||
import jdk.jfr.Period;
|
||||
import jdk.jfr.StackTrace;
|
||||
import jdk.jfr.Threshold;
|
||||
import jdk.jfr.Timespan;
|
||||
import jdk.jfr.internal.Type;
|
||||
|
||||
|
@ -28,13 +28,8 @@ package jdk.jfr.events;
|
||||
import jdk.jfr.Category;
|
||||
import jdk.jfr.DataAmount;
|
||||
import jdk.jfr.Description;
|
||||
import jdk.jfr.Enabled;
|
||||
import jdk.jfr.Label;
|
||||
import jdk.jfr.Name;
|
||||
import jdk.jfr.Period;
|
||||
import jdk.jfr.StackTrace;
|
||||
import jdk.jfr.Threshold;
|
||||
import jdk.jfr.Timespan;
|
||||
import jdk.jfr.internal.Type;
|
||||
|
||||
|
||||
|
@ -28,13 +28,8 @@ package jdk.jfr.events;
|
||||
import jdk.jfr.Category;
|
||||
import jdk.jfr.DataAmount;
|
||||
import jdk.jfr.Description;
|
||||
import jdk.jfr.Enabled;
|
||||
import jdk.jfr.Label;
|
||||
import jdk.jfr.Name;
|
||||
import jdk.jfr.Period;
|
||||
import jdk.jfr.StackTrace;
|
||||
import jdk.jfr.Threshold;
|
||||
import jdk.jfr.Timespan;
|
||||
import jdk.jfr.internal.Type;
|
||||
|
||||
@Name(Type.EVENT_NAME_PREFIX + "ContainerMemoryUsage")
|
||||
|
@ -26,12 +26,10 @@
|
||||
package jdk.jfr.events;
|
||||
|
||||
import jdk.jfr.Category;
|
||||
import jdk.jfr.Description;
|
||||
import jdk.jfr.Label;
|
||||
import jdk.jfr.Name;
|
||||
import jdk.jfr.Timespan;
|
||||
import jdk.jfr.internal.MirrorEvent;
|
||||
import jdk.jfr.internal.Type;
|
||||
|
||||
@Category("Java Application")
|
||||
@Label("Java Thread Sleep")
|
||||
|
@ -290,7 +290,6 @@ public final class EventInstrumentation {
|
||||
String fieldName = field.getName();
|
||||
if (!fieldSet.contains(fieldName)) {
|
||||
Type fieldType = Type.getType(field.getType());
|
||||
String internalClassName = ASMToolkit.getInternalName(c.getName());
|
||||
fieldInfos.add(new FieldInfo(fieldName, fieldType.getDescriptor()));
|
||||
fieldSet.add(fieldName);
|
||||
}
|
||||
|
@ -46,8 +46,6 @@ import jdk.jfr.Period;
|
||||
import jdk.jfr.StackTrace;
|
||||
import jdk.jfr.Threshold;
|
||||
import jdk.jfr.ValueDescriptor;
|
||||
import jdk.jfr.SettingControl;
|
||||
import jdk.jfr.internal.EventInstrumentation.SettingInfo;
|
||||
import jdk.jfr.internal.RequestEngine.RequestHook;
|
||||
import jdk.jfr.internal.consumer.RepositoryFiles;
|
||||
import jdk.jfr.internal.event.EventConfiguration;
|
||||
|
@ -27,9 +27,6 @@ package jdk.jfr.internal;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import jdk.jfr.internal.LogLevel;
|
||||
import jdk.jfr.internal.LogTag;
|
||||
import jdk.jfr.internal.Logger;
|
||||
import jdk.jfr.internal.SecuritySupport.SafePath;
|
||||
import jdk.internal.misc.Unsafe;
|
||||
|
||||
|
@ -47,7 +47,6 @@ import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import jdk.jfr.EventType;
|
||||
import jdk.jfr.FlightRecorder;
|
||||
import jdk.jfr.FlightRecorderListener;
|
||||
import jdk.jfr.Recording;
|
||||
|
@ -49,14 +49,11 @@ import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.nio.file.attribute.FileTime;
|
||||
import java.security.AccessControlContext;
|
||||
import java.security.AccessController;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Permission;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.PrivilegedActionException;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.PropertyPermission;
|
||||
|
@ -32,10 +32,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.annotation.Repeatable;
|
||||
@ -57,9 +54,6 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import jdk.internal.module.Checks;
|
||||
import jdk.internal.org.objectweb.asm.ClassReader;
|
||||
import jdk.internal.org.objectweb.asm.util.CheckClassAdapter;
|
||||
import jdk.internal.platform.Metrics;
|
||||
import jdk.jfr.Event;
|
||||
import jdk.jfr.FlightRecorderPermission;
|
||||
import jdk.jfr.Recording;
|
||||
|
@ -45,7 +45,6 @@ final class FileChannelImplInstrumentor {
|
||||
|
||||
private String path;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public void force(boolean metaData) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_FORCE;
|
||||
@ -65,7 +64,6 @@ final class FileChannelImplInstrumentor {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read(ByteBuffer dst) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
@ -90,7 +88,6 @@ final class FileChannelImplInstrumentor {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read(ByteBuffer dst, long position) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
@ -115,7 +112,6 @@ final class FileChannelImplInstrumentor {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
@ -140,7 +136,6 @@ final class FileChannelImplInstrumentor {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int write(ByteBuffer src) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
@ -162,7 +157,6 @@ final class FileChannelImplInstrumentor {
|
||||
return bytesWritten;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int write(ByteBuffer src, long position) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
@ -185,7 +179,6 @@ final class FileChannelImplInstrumentor {
|
||||
return bytesWritten;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
|
@ -42,7 +42,6 @@ final class FileInputStreamInstrumentor {
|
||||
|
||||
private String path;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read() throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
@ -70,7 +69,6 @@ final class FileInputStreamInstrumentor {
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read(byte b[]) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
@ -95,7 +93,6 @@ final class FileInputStreamInstrumentor {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
|
@ -42,7 +42,6 @@ final class FileOutputStreamInstrumentor {
|
||||
|
||||
private String path;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public void write(int b) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
@ -64,7 +63,6 @@ final class FileOutputStreamInstrumentor {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public void write(byte b[]) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
@ -86,7 +84,6 @@ final class FileOutputStreamInstrumentor {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
|
@ -43,7 +43,6 @@ final class RandomAccessFileInstrumentor {
|
||||
|
||||
private String path;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read() throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
@ -71,7 +70,6 @@ final class RandomAccessFileInstrumentor {
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read(byte b[]) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
@ -96,7 +94,6 @@ final class RandomAccessFileInstrumentor {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
|
||||
@ -121,7 +118,6 @@ final class RandomAccessFileInstrumentor {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public void write(int b) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
@ -143,7 +139,6 @@ final class RandomAccessFileInstrumentor {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public void write(byte b[]) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
@ -165,7 +160,6 @@ final class RandomAccessFileInstrumentor {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
|
||||
|
@ -44,7 +44,6 @@ final class SocketChannelImplInstrumentor {
|
||||
private SocketChannelImplInstrumentor() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read(ByteBuffer dst) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_READ;
|
||||
@ -86,7 +85,6 @@ final class SocketChannelImplInstrumentor {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_READ;
|
||||
@ -128,7 +126,6 @@ final class SocketChannelImplInstrumentor {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int write(ByteBuffer buf) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_WRITE;
|
||||
@ -168,7 +165,6 @@ final class SocketChannelImplInstrumentor {
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_WRITE;
|
||||
|
@ -42,7 +42,6 @@ final class SocketInputStreamInstrumentor {
|
||||
private SocketInputStreamInstrumentor() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public int read(byte b[], int off, int length) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_READ;
|
||||
|
@ -42,7 +42,6 @@ final class SocketOutputStreamInstrumentor {
|
||||
private SocketOutputStreamInstrumentor() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@JIInstrumentationMethod
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_WRITE;
|
||||
|
@ -43,7 +43,6 @@ import jdk.jfr.internal.Utils;
|
||||
@Name(Type.SETTINGS_PREFIX + "Cutoff")
|
||||
@Timespan
|
||||
public final class CutoffSetting extends JDKSettingControl {
|
||||
private static final long typeId = Type.getTypeId(CutoffSetting.class);
|
||||
|
||||
private String value = "0 ns";
|
||||
private final PlatformEventType eventType;
|
||||
|
@ -42,7 +42,6 @@ import jdk.jfr.internal.Utils;
|
||||
@Description("Throttles the emission rate for an event")
|
||||
@Name(Type.SETTINGS_PREFIX + "Throttle")
|
||||
public final class ThrottleSetting extends JDKSettingControl {
|
||||
private static final long typeId = Type.getTypeId(ThrottleSetting.class);
|
||||
private static final long OFF = -2;
|
||||
private String value = "0/s";
|
||||
private final PlatformEventType eventType;
|
||||
|
Loading…
Reference in New Issue
Block a user