final class jdk.jfr.internal.dcmd.DCmdStop extends jdk.jfr.internal.dcmd.AbstractDCmd
  minor version: 0
  major version: 59
  flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
  this_class: jdk.jfr.internal.dcmd.DCmdStop
  super_class: jdk.jfr.internal.dcmd.AbstractDCmd
{
  void <init>();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.jfr.internal.dcmd.DCmdStop this
         0: .line 42
            aload 0 /* this */
            invokespecial jdk.jfr.internal.dcmd.AbstractDCmd.<init>:()V
            return
        end local 0 // jdk.jfr.internal.dcmd.DCmdStop this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/jfr/internal/dcmd/DCmdStop;

  public java.lang.String execute(java.lang.String, java.lang.String);
    descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=8, locals=6, args_size=3
        start local 0 // jdk.jfr.internal.dcmd.DCmdStop this
        start local 1 // java.lang.String name
        start local 2 // java.lang.String filename
         0: .line 59
            getstatic jdk.jfr.internal.LogTag.JFR_DCMD:Ljdk/jfr/internal/LogTag;
            getstatic jdk.jfr.internal.LogLevel.DEBUG:Ljdk/jfr/internal/LogLevel;
            invokestatic jdk.jfr.internal.Logger.shouldLog:(Ljdk/jfr/internal/LogTag;Ljdk/jfr/internal/LogLevel;)Z
            ifeq 2
         1: .line 60
            getstatic jdk.jfr.internal.LogTag.JFR_DCMD:Ljdk/jfr/internal/LogTag;
            getstatic jdk.jfr.internal.LogLevel.DEBUG:Ljdk/jfr/internal/LogLevel;
            new java.lang.StringBuilder
            dup
            ldc "Executing DCmdStart: name="
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 1 /* name */
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            ldc ", filename="
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            aload 2 /* filename */
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokestatic jdk.jfr.internal.Logger.log:(Ljdk/jfr/internal/LogTag;Ljdk/jfr/internal/LogLevel;Ljava/lang/String;)V
         2: .line 64
      StackMap locals:
      StackMap stack:
            aconst_null
            astore 3 /* safePath */
        start local 3 // jdk.jfr.internal.SecuritySupport$SafePath safePath
         3: .line 65
            aload 0 /* this */
            aload 1 /* name */
            invokevirtual jdk.jfr.internal.dcmd.DCmdStop.findRecording:(Ljava/lang/String;)Ljdk/jfr/Recording;
            astore 4 /* recording */
        start local 4 // jdk.jfr.Recording recording
         4: .line 66
            aload 2 /* filename */
            ifnull 10
         5: .line 70
            aload 0 /* this */
            aconst_null
            aload 2 /* filename */
            invokevirtual jdk.jfr.internal.dcmd.DCmdStop.resolvePath:(Ljdk/jfr/Recording;Ljava/lang/String;)Ljdk/jfr/internal/SecuritySupport$SafePath;
            astore 3 /* safePath */
         6: .line 71
            aload 4 /* recording */
            aload 2 /* filename */
            iconst_0
            anewarray java.lang.String
            invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
            invokevirtual jdk.jfr.Recording.setDestination:(Ljava/nio/file/Path;)V
         7: .line 72
            goto 10
      StackMap locals: jdk.jfr.internal.dcmd.DCmdStop java.lang.String java.lang.String jdk.jfr.internal.SecuritySupport$SafePath jdk.jfr.Recording
      StackMap stack: java.lang.Exception
         8: astore 5 /* e */
        start local 5 // java.lang.Exception e
         9: .line 73
            new jdk.jfr.internal.dcmd.DCmdException
            dup
            ldc "Failed to stop %s. Could not set destination for \"%s\" to file %s"
            iconst_3
            anewarray java.lang.Object
            dup
            iconst_0
            aload 4 /* recording */
            invokevirtual jdk.jfr.Recording.getName:()Ljava/lang/String;
            aastore
            dup
            iconst_1
            aload 2 /* filename */
            aastore
            dup
            iconst_2
            aload 5 /* e */
            invokevirtual java.lang.Exception.getMessage:()Ljava/lang/String;
            aastore
            invokespecial jdk.jfr.internal.dcmd.DCmdException.<init>:(Ljava/lang/String;[Ljava/lang/Object;)V
            athrow
        end local 5 // java.lang.Exception e
        10: .line 76
      StackMap locals:
      StackMap stack:
            aload 4 /* recording */
            invokevirtual jdk.jfr.Recording.stop:()Z
            pop
        11: .line 77
            aload 0 /* this */
            ldc "Stopped"
            aload 4 /* recording */
            invokevirtual jdk.jfr.Recording.getName:()Ljava/lang/String;
            aload 3 /* safePath */
            invokevirtual jdk.jfr.internal.dcmd.DCmdStop.reportOperationComplete:(Ljava/lang/String;Ljava/lang/String;Ljdk/jfr/internal/SecuritySupport$SafePath;)V
        12: .line 78
            aload 4 /* recording */
            invokevirtual jdk.jfr.Recording.close:()V
        13: .line 79
            aload 0 /* this */
            invokevirtual jdk.jfr.internal.dcmd.DCmdStop.getResult:()Ljava/lang/String;
        14: areturn
        end local 4 // jdk.jfr.Recording recording
        end local 3 // jdk.jfr.internal.SecuritySupport$SafePath safePath
        15: .line 80
      StackMap locals: jdk.jfr.internal.dcmd.DCmdStop java.lang.String java.lang.String
      StackMap stack: java.lang.Exception
            astore 3 /* e */
        start local 3 // java.lang.Exception e
        16: .line 81
            aload 2 /* filename */
            ifnull 18
        17: .line 82
            new jdk.jfr.internal.dcmd.DCmdException
            dup
            ldc "Could not write recording \"%s\" to file. %s"
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            aload 1 /* name */
            aastore
            dup
            iconst_1
            aload 3 /* e */
            invokevirtual java.lang.Exception.getMessage:()Ljava/lang/String;
            aastore
            invokespecial jdk.jfr.internal.dcmd.DCmdException.<init>:(Ljava/lang/String;[Ljava/lang/Object;)V
            athrow
        18: .line 84
      StackMap locals: java.lang.Exception
      StackMap stack:
            new jdk.jfr.internal.dcmd.DCmdException
            dup
            aload 3 /* e */
            ldc "Could not stop recording \"%s\"."
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            aload 1 /* name */
            aastore
            dup
            iconst_1
            aload 3 /* e */
            invokevirtual java.lang.Exception.getMessage:()Ljava/lang/String;
            aastore
            invokespecial jdk.jfr.internal.dcmd.DCmdException.<init>:(Ljava/lang/Throwable;Ljava/lang/String;[Ljava/lang/Object;)V
            athrow
        end local 3 // java.lang.Exception e
        end local 2 // java.lang.String filename
        end local 1 // java.lang.String name
        end local 0 // jdk.jfr.internal.dcmd.DCmdStop this
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0   19     0       this  Ljdk/jfr/internal/dcmd/DCmdStop;
            0   19     1       name  Ljava/lang/String;
            0   19     2   filename  Ljava/lang/String;
            3   15     3   safePath  Ljdk/jfr/internal/SecuritySupport$SafePath;
            4   15     4  recording  Ljdk/jfr/Recording;
            9   10     5          e  Ljava/lang/Exception;
           16   19     3          e  Ljava/lang/Exception;
      Exception table:
        from    to  target  type
           5     7       8  Class java.io.IOException
           5     7       8  Class java.nio.file.InvalidPathException
           2    14      15  Class java.nio.file.InvalidPathException
           2    14      15  Class jdk.jfr.internal.dcmd.DCmdException
    Exceptions:
      throws jdk.jfr.internal.dcmd.DCmdException
    MethodParameters:
          Name  Flags
      name      
      filename  
}
SourceFile: "DCmdStop.java"
InnerClasses:
  public final SafePath = jdk.jfr.internal.SecuritySupport$SafePath of jdk.jfr.internal.SecuritySupport