Skip to content

Commit 51ca473

Browse files
author
duke
committedJan 11, 2022
Automatic merge of jdk:master into master
2 parents 1777909 + ec5a455 commit 51ca473

File tree

6 files changed

+2
-61
lines changed

6 files changed

+2
-61
lines changed
 

‎src/jdk.jfr/share/classes/jdk/jfr/Recording.java

-19
Original file line numberDiff line numberDiff line change
@@ -424,25 +424,6 @@ public void setMaxSize(long maxSize) {
424424
internal.setMaxSize(maxSize);
425425
}
426426

427-
/**
428-
* Determines how often events are made available for streaming.
429-
*
430-
* @param interval the interval at which events are made available for streaming.
431-
*
432-
* @throws IllegalArgumentException if {@code interval} is negative
433-
*
434-
* @throws IllegalStateException if the recording is in the {@code CLOSED} state
435-
*
436-
* @since 14
437-
*/
438-
/*package private*/ void setFlushInterval(Duration interval) {
439-
Objects.requireNonNull(interval);
440-
if (interval.isNegative()) {
441-
throw new IllegalArgumentException("Stream interval can't be negative");
442-
}
443-
internal.setFlushInterval(interval);
444-
}
445-
446427
/**
447428
* Returns how often events are made available for streaming purposes.
448429
*

‎src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java

-13
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import java.io.Reader;
3434
import java.lang.invoke.MethodHandles;
3535
import java.lang.reflect.Constructor;
36-
import java.lang.reflect.Field;
3736
import java.lang.reflect.Method;
3837
import java.lang.reflect.ReflectPermission;
3938
import java.nio.channels.FileChannel;
@@ -354,10 +353,6 @@ static void setUncaughtExceptionHandler(Thread thread, Thread.UncaughtExceptionH
354353
doPrivileged(() -> thread.setUncaughtExceptionHandler(eh), new RuntimePermission("modifyThread"));
355354
}
356355

357-
static void moveReplace(SafePath from, SafePath to) throws IOException {
358-
doPrivilegedIOWithReturn(() -> Files.move(from.toPath(), to.toPath()));
359-
}
360-
361356
static void clearDirectory(SafePath safePath) throws IOException {
362357
doPriviligedIO(() -> Files.walkFileTree(safePath.toPath(), new DirectoryCleaner()));
363358
}
@@ -404,10 +399,6 @@ static boolean isWritable(SafePath safePath) throws IOException {
404399
return doPrivilegedIOWithReturn(() -> Files.isWritable(safePath.toPath()));
405400
}
406401

407-
static void deleteOnExit(SafePath safePath) {
408-
doPrivileged(() -> safePath.toPath().toFile().deleteOnExit());
409-
}
410-
411402
static ReadableByteChannel newFileChannelToRead(SafePath safePath) throws IOException {
412403
return doPrivilegedIOWithReturn(() -> FileChannel.open(safePath.toPath(), StandardOpenOption.READ));
413404
}
@@ -420,10 +411,6 @@ public static Reader newFileReader(SafePath safePath) throws FileNotFoundExcepti
420411
return doPrivilegedIOWithReturn(() -> Files.newBufferedReader(safePath.toPath()));
421412
}
422413

423-
static void touch(SafePath path) throws IOException {
424-
doPriviligedIO(() -> new RandomAccessFile(path.toPath().toFile(), "rw").close());
425-
}
426-
427414
static void setAccessible(Method method) {
428415
doPrivileged(() -> method.setAccessible(true), new ReflectPermission("suppressAccessChecks"));
429416
}

‎src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ChunkHeader.java

-8
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,6 @@ public void refresh() throws IOException {
163163
}
164164
}
165165

166-
public boolean readHeader(byte[] bytes, int count) throws IOException {
167-
input.position(absoluteChunkStart);
168-
for (int i = 0; i< count; i++) {
169-
bytes[i] = input.readPhysicalByte();
170-
}
171-
return bytes[(int)FILE_STATE_POSITION] != UPDATING_CHUNK_HEADER;
172-
}
173-
174166
public void awaitFinished() throws IOException {
175167
if (finished) {
176168
return;

‎src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
2828
import java.io.IOException;
2929
import java.nio.file.Path;
3030
import java.security.AccessControlContext;
31-
import java.time.Duration;
3231
import java.time.Instant;
3332
import java.util.Arrays;
3433
import java.util.Comparator;
@@ -49,7 +48,7 @@
4948
* with chunk files.
5049
*
5150
*/
52-
public class EventDirectoryStream extends AbstractEventStream {
51+
public final class EventDirectoryStream extends AbstractEventStream {
5352

5453
private static final Comparator<? super RecordedEvent> EVENT_COMPARATOR = JdkJfrConsumer.instance().eventComparator();
5554

@@ -60,8 +59,6 @@ public class EventDirectoryStream extends AbstractEventStream {
6059
private long currentChunkStartNanos;
6160
private RecordedEvent[] sortedCache;
6261
private int threadExclusionLevel = 0;
63-
protected volatile long maxSize;
64-
protected volatile Duration maxAge;
6562

6663
private volatile Consumer<Long> onCompleteHandler;
6764

@@ -259,12 +256,4 @@ private boolean processUnordered(Dispatcher c) throws IOException {
259256
c.dispatch(e);
260257
}
261258
}
262-
263-
public void setMaxSize(long maxSize) {
264-
this.maxSize = maxSize;
265-
}
266-
267-
public void setMaxAge(Duration maxAge) {
268-
this.maxAge = maxAge;
269-
}
270259
}

‎src/jdk.jfr/share/classes/jdk/jfr/internal/settings/CutoffSetting.java

-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ public String getValue() {
7878
return value;
7979
}
8080

81-
public static boolean isType(long typeId) {
82-
return CutoffSetting.typeId == typeId;
83-
}
84-
8581
public static long parseValueSafe(String value) {
8682
if (value == null) {
8783
return 0L;

‎src/jdk.jfr/share/classes/jdk/jfr/internal/settings/ThrottleSetting.java

-4
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,5 @@ public void setValue(String s) {
9191
public String getValue() {
9292
return value;
9393
}
94-
95-
public static boolean isType(long typeId) {
96-
return ThrottleSetting.typeId == typeId;
97-
}
9894
}
9995

0 commit comments

Comments
 (0)
Failed to load comments.