Skip to content

--profile heap-dump silently fails to produce a heap dump if Gradle is ran with -m or --dry-run #618

@abstratt

Description

@abstratt

--profile heap-dump silently fails to produce a heap dump if Gradle is ran with -m or (its own) --dry-run. This is with a build from source from f707394 (towards 0.23, yet to be released).

Build file:

// build.gradle.kts
println("*** Configuring ${this.buildscript.sourceFile}")

Scenario file:

// simple.scenarios
simple {
    tasks = ["build"]
    clear-configuration-cache-state-before = BUILD
    gradle-args = ["--configuration-cache", "--dry-run"]    
}

Command-line:

gradle-profiler --scenario simple.scenarios  --gradle-version 9.0.0 simple --profile heap-dump

generates a profile-out-<sequential> containing only a profile.log file.

Fragments of the output:

* Writing results to /Users/rafael/sources/repros/test2/profile-out-51

* Settings
Project dir: /Users/rafael/sources/repros/test2
Output dir: /Users/rafael/sources/repros/test2/profile-out-51
Profiler: org.gradle.profiler.heapdump.HeapDumpProfiler@2aafb23c
Benchmark: false
Versions: [9.0.0]
Gradle User Home: /Users/rafael/sources/repros/test2/gradle-user-home
Targets: [simple]
Warm-ups: 1
Builds: 1

[...]

* Stopping daemons
Running command /Users/rafael/sources/repros/test2/gradle-user-home/wrapper/dists/gradle-9.0.0-bin/d6wjpkvcgsg3oed0qlfss3wgl/gradle-9.0.0/bin/gradle --stop --gradle-user-home /Users/rafael/sources/repros/test2/gradle-user-home
Stopping Daemon(s)
1 Daemon stopped

* Results written to /Users/rafael/sources/repros/test2/profile-out-51

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions