RFR: 8204681: Option to include timestamp in hprof filename [v2]
Sonia Zaldana Calles
szaldana at openjdk.org
Tue Sep 10 15:42:57 UTC 2024
> Hi all,
>
> This PR addresses [8204681](https://bugs.openjdk.org/browse/JDK-8204681) enabling support for timestamp expansion in filenames specified in `-XX:HeapDumpPath` using `%t`.
>
> As mentioned in this comments for this issue, this is somewhat related to [8334492](https://bugs.openjdk.org/browse/JDK-8334492) where we enabled support for `%p` for filenames specified in jcmd.
>
> With this patch, I propose:
> - Expanding the utility function `Arguments::copy_expand_pid` to `Arguments::copy_expand_arguments` to deal with `%p` expansions for pid and `%t` expansions for timestamps.
> - Leveraging the above utility function to enable argument expansion for both heap dump filenames and jcmd output commands.
> - Though the linked JBS issue only relates to heap dumps generated in case of OOM, I think we can edit it to more broadly support filename expansion to support `%t` for jcmd as well.
>
> Testing:
> - [x] Added test cases pass with all platforms (verified with a GHA job).
> - [x] Tier 1 passes with GHA.
>
> Looking forward to hearing your thoughts!
>
> Thanks,
> Sonia
Sonia Zaldana Calles has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'openjdk:master' into JDK-8204681
- 8204681: Option to include timestamp in hprof filename
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20568/files
- new: https://git.openjdk.org/jdk/pull/20568/files/c550c9fd..165a77b4
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20568&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20568&range=00-01
Stats: 44121 lines in 1412 files changed: 27993 ins; 8898 del; 7230 mod
Patch: https://git.openjdk.org/jdk/pull/20568.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20568/head:pull/20568
PR: https://git.openjdk.org/jdk/pull/20568
More information about the serviceability-dev
mailing list