Closed nobeh closed 9 years ago
Thanks for the suggestions. What kind of issues did you have?
The reason that PERF_FLAME_OUTPUT
defaults to the current directory is that the output file is a "real product" of the call so I wouldn't want it to default to a possibly transient directory.
I agree with the argument. Here is how I used the tool:
$ # clone the repo
$ # install
$ # did NOT create the symlinks
$ launch my app on a different term
$ cd /path/to/perf-map-agent
$ ./bin/perf-java-flames $PID
With the suggestions to resolve the real path of perf-map-agent
, in the end, I got the result in root directory of perf-map-agent
. I agree this is not critical and due to how I used the tool. However, I would also not want to pollute the git repo for perf-map-agent
when using it.
Without the suggestions to resolve the real path of `perf-map-agent, I actually got an exception about failing to load the agent which makes sense because of how I used the tool.
I just found out that the script really was broken and it just worked for me before only because of an unclean work directory. I fixed it in the launcher script (adding the out
directory) as you suggested and added extra diagnostic output to the Java attacher in case the library is missing.
Thanks for raising this issue.
Thanks for your small but very useful tool. I've been working with the latest commits from master on the tool and I hit some issues mainly related to how the paths are solved and the main JAR file is executed. Here is a suggest to improve a bit for simpler usage:
Summary:
ATTACH_JAR_PATH
.realpath
for more correctly resolve the base directory ofperf-map-agent
.PERF_FLAME_OUTPUT
to$PERF_JAVA_TMP/flamegraph-$PID.svg
if not already set.