[8u] RFR: 8220657: JFR.dump does not work when filename is set
Mario Torre
neugens at redhat.com
Thu Aug 6 08:22:26 UTC 2020
Hi Andrew,
I did build and test the patch, perhaps we are testing with a different version?
getRealPathText is in the codebase, and I do remember it was
introduced some time ago since I recall a similar failure in the past
for another change although right now I forgot which patch that was.
Cheers,
Mario
On Thu, Aug 6, 2020 at 4:49 AM Andrew Hughes <gnu.andrew at redhat.com> wrote:
>
> On 20:04 Thu 30 Jul , Ekaterina Vergizova wrote:
> > Hello,
> > I would like to backport JFR issue 8220657 to 8u.
> >
> > JBS: https://bugs.openjdk.java.net/browse/JDK-8220657
> > Original patch: https://hg.openjdk.java.net/jdk/jdk/rev/bd613b97c7c8
> > Webrev for 8u: https://cr.openjdk.java.net/~apetushkov/jfr_backports_katya/8220657/webrev.00/
> >
> > The patch applies cleanly, but the added test TestJcmdDumpWithFileName.java requires some adjustments to pass under 8u:
> > - the test tags are adjusted
> > - ProcessHandle.current().pid() calls replaced by ProcessTools.getProcessId()
> > - Path.of() calls replaced by their 8u analogue Paths.get()
> > - unsupported syntax `try (stream)` replaced by standard try-with-resources
> >
> > Tested with tier1 and jdk.jfr tests on Linux and Windows, the added test TestJcmdDumpWithFileName.java failed before the fix and passes after.
> >
> > Thanks,
> > Ekaterina
> >
>
> This patch doesn't build:
>
> Compiling 9722 files for BUILD_JDK
> (/usr/lib/jvm/java-1.8.0-openjdk/bin/java -Xms64M -Xmx1600M -XX:ThreadStackSize=1536 "-Xbootclasspath/p:/home/ahughes/builder/8u-dev/langtools/dist/bootstrap/lib/javac.jar" -cp /home/ahughes/builder/8u-dev/langtools/dist/bootstrap/lib/javac.jar com.sun.tools.javac.Main -bootclasspath /home/ahughes/builder/8u-dev/jdk/classes -source 8 -target 8 -encoding ascii -XDignore.symbol.file=true -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,try,varargs -Werror -g -implicit:none -sourcepath "/home/ahughes/projects/openjdk/upstream/jdk8u-dev/jdk/src/share/classes:/home/ahughes/projects/openjdk/upstream/jdk8u-dev/jdk/src/solaris/classes:/home/ahughes/builder/8u-dev/jdk/gensrc:/home/ahughes/builder/8u-dev/jdk/gensrc_no_srczip" -d /home/ahughes/builder/8u-dev/jdk/classes -h /home/ahughes/builder/8u-dev/jdk/gensrc_headers.BUILD_JDK.tmp @/home/ahughes/builder/8u-dev/jdk/classes/_the.BUILD_JDK_batch.tmp && /usr/bin/mv /home/ahughes/builder/8u-dev/jdk/classes/_the.BUILD_JDK_batch.tmp /home/ahughes/builder/8u-dev/jdk/classes/_the.BUILD_JDK_batch)
> /home/ahughes/projects/openjdk/upstream/jdk8u-dev/jdk/src/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java:161: error: cannot find symbol
> reportOperationComplete("Dumped", name, new SafePath(wup.getRealPathText()));
> ^
> symbol: method getRealPathText()
> location: variable wup of type WriteableUserPath
>
> My attention was drawn to this even before building, because, in
> comparing the 11u version of this patch with this proposed 8u one,
> this line was changed for the 8u backport:
>
> @@ -75,15 +64,13 @@
> + wup = new WriteableUserPath(safe.toPath());
> + }
> + r.dumpStopped(wup);
> -+ reportOperationComplete("Dumped", name, new SafePath(wup.getText()));
> ++ reportOperationComplete("Dumped", name, new SafePath(wup.getRealPathText()));
>
> something which wasn't explained in the above, and, indeed,
> I see no getRealPathText method in the 8u codebase.
>
> Thanks,
> --
> Andrew :)
>
> Senior Free Java Software Engineer
> OpenJDK Package Owner
> Red Hat, Inc. (http://www.redhat.com)
>
> PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
> Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
--
Mario Torre
Associate Manager, Software Engineering
Red Hat GmbH <https://www.redhat.com>
9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898
More information about the jdk8u-dev
mailing list