Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: add option to set source paths #418

Closed
GitMensch opened this issue Nov 14, 2022 · 5 comments · Fixed by #486 or #497
Closed

FR: add option to set source paths #418

GitMensch opened this issue Nov 14, 2022 · 5 comments · Fixed by #486 or #497

Comments

@GitMensch
Copy link
Contributor

Double clicking on a location in the callee/caller pane that has relative source file references I get the "failed to find file for location".

  • recording: one locally before opening hotspot with perf record --sample-cpu -z --aio --call-graph dwarf
  • original sources under: /home/me/project/lib
  • original build under /home/me/project/build/lib - using relative files starting with ../../lib
  • use of installed binaries under /opt/install/project/lib
  • everything works without any setup in GDB
  • hotspot fails to resolve the source

I think this likely can be worked around using the configuration, but as my tinkering with that did not work out asking for help.

@milianw
Copy link
Member

milianw commented Nov 14, 2022

See the other report: please help us reproduce this issue by providing a project we can compile that triggers this behavior

@milianw milianw added the needs_info not enough info label Nov 17, 2022
@GitMensch
Copy link
Contributor Author

The other issue is about handling stored debug info correct.
This issue is about the option to configure paths. How would I configure Hotspot in the following scenario:

pushd tests/test-clients
gcc $(PWD)/cpp-stdin/main.cpp
popd
mv tests/test-clients/cpp-stdin ./cpp-stdin 
perf record --sample-cpu -z --aio --call-graph dwarf ./tests/test-clients/a.out
  • source file not on the original place
  • hotspot can't find that file
  • user wants to configure lookup paths

@milianw milianw added enhancement and removed needs_info not enough info labels Nov 27, 2022
@milianw
Copy link
Member

milianw commented Nov 27, 2022

Ah I see, yes we should probably add some kind of path mapping or at least a list of source paths to query.

@GitMensch GitMensch changed the title How to work around "failed to find file for location" (relative file)? FR: add option to set source paths Nov 28, 2022
@GitMensch
Copy link
Contributor Author

Note: GDB comes with both directories and substitute-path settings; but I guess the first one would work for most cases where perf is used.

@GitMensch
Copy link
Contributor Author

kind of related to #450 - which is about binary data as both are easily stored for inspecting perf data later / on a different machine

lievenhey added a commit that referenced this issue May 17, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue May 17, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue Jun 29, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue Jun 29, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue Jul 4, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue Jul 4, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue Jul 7, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue Jul 7, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue Jul 20, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
milianw pushed a commit that referenced this issue Jul 21, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
milianw pushed a commit that referenced this issue Jul 21, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
milianw pushed a commit that referenced this issue Jul 21, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
lievenhey added a commit that referenced this issue Jul 25, 2023
this patch add allows the user to add a custom source path which will
overwrite the source path provided in the binary
this makes the disassembler, ... work if the source code directory was
moved after creating the binary

closes: #418
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants