Skip to content

Commit

Permalink
8295879: JFR: Remove warnings in the jdk.jfr module
Browse files Browse the repository at this point in the history
Reviewed-by: mgronlun
  • Loading branch information
egahlin committed Oct 26, 2022
1 parent 33ff80d commit 78454b6
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@
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;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@
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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ private static List<FieldInfo> buildFieldInfos(Class<?> superClass, ClassNode cl
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
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;
Expand Down
3 changes: 0 additions & 3 deletions src/jdk.jfr/share/classes/jdk/jfr/internal/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@

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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,11 @@
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;
Expand Down
6 changes: 0 additions & 6 deletions src/jdk.jfr/share/classes/jdk/jfr/internal/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
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;
Expand All @@ -57,9 +54,6 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ private FileChannelImplInstrumentor() {

private String path;

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public void force(boolean metaData) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_FORCE;
Expand All @@ -65,7 +64,6 @@ public void force(boolean metaData) throws IOException {
}
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read(ByteBuffer dst) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand All @@ -90,7 +88,6 @@ public int read(ByteBuffer dst) throws IOException {
return bytesRead;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read(ByteBuffer dst, long position) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand All @@ -115,7 +112,6 @@ public int read(ByteBuffer dst, long position) throws IOException {
return bytesRead;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand All @@ -140,7 +136,6 @@ public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
return bytesRead;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int write(ByteBuffer src) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand All @@ -162,7 +157,6 @@ public int write(ByteBuffer src) throws IOException {
return bytesWritten;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int write(ByteBuffer src, long position) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand All @@ -185,7 +179,6 @@ public int write(ByteBuffer src, long position) throws IOException {
return bytesWritten;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ private FileInputStreamInstrumentor() {

private String path;

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read() throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand Down Expand Up @@ -70,7 +69,6 @@ public int read() throws IOException {
return result;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read(byte b[]) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand All @@ -95,7 +93,6 @@ public int read(byte b[]) throws IOException {
return bytesRead;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read(byte b[], int off, int len) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ private FileOutputStreamInstrumentor() {

private String path;

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public void write(int b) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand All @@ -64,7 +63,6 @@ public void write(int b) throws IOException {
}
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public void write(byte b[]) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand All @@ -86,7 +84,6 @@ public void write(byte b[]) throws IOException {
}
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public void write(byte b[], int off, int len) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ private RandomAccessFileInstrumentor() {

private String path;

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read() throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand Down Expand Up @@ -71,7 +70,6 @@ public int read() throws IOException {
return result;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read(byte b[]) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand All @@ -96,7 +94,6 @@ public int read(byte b[]) throws IOException {
return bytesRead;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read(byte b[], int off, int len) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_READ;
Expand All @@ -121,7 +118,6 @@ public int read(byte b[], int off, int len) throws IOException {
return bytesRead;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public void write(int b) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand All @@ -143,7 +139,6 @@ public void write(int b) throws IOException {
}
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public void write(byte b[]) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand All @@ -165,7 +160,6 @@ public void write(byte b[]) throws IOException {
}
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public void write(byte b[], int off, int len) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.FILE_WRITE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ final class SocketChannelImplInstrumentor {
private SocketChannelImplInstrumentor() {
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int read(ByteBuffer dst) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_READ;
Expand Down Expand Up @@ -86,7 +85,6 @@ public int read(ByteBuffer dst) throws IOException {
return bytesRead;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_READ;
Expand Down Expand Up @@ -128,7 +126,6 @@ public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
return bytesRead;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public int write(ByteBuffer buf) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_WRITE;
Expand Down Expand Up @@ -168,7 +165,6 @@ public SocketAddress getRemoteAddress() throws IOException {
return null;
}

@SuppressWarnings("deprecation")
@JIInstrumentationMethod
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
EventConfiguration eventConfiguration = EventConfigurations.SOCKET_WRITE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
@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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
@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;
Expand Down

1 comment on commit 78454b6

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.