< prev index next >
src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, 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. Oracle designates this
@@ -55,10 +55,12 @@
import jdk.jfr.RecordingState;
import jdk.jfr.internal.SecuritySupport.SafePath;
public final class PlatformRecording implements AutoCloseable {
+ public static final String REASON_DUMPED_BY_USER = "Dumped by user";
+
private final PlatformRecorder recorder;
private final long id;
// Recording settings
private Map<String, String> settings = new LinkedHashMap<>();
private Duration duration;
@@ -158,11 +160,11 @@
String endText = reason == null ? "" : ". Reason \"" + reason + "\".";
Logger.log(LogTag.JFR, LogLevel.INFO, "Stopped recording \"" + getName() + "\" (" + getId() + ")" + endText);
this.stopTime = Instant.now();
newState = getState();
}
- WriteableUserPath dest = getDestination();
+ WriteableUserPath dest = reason.equals(REASON_DUMPED_BY_USER) ? null : getDestination();
if (dest != null) {
try {
dumpStopped(dest);
Logger.log(LogTag.JFR, LogLevel.INFO, "Wrote recording \"" + getName() + "\" (" + getId() + ") to " + dest.getText());
< prev index next >