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

Add a "substitute path" option #612

Open
GitMensch opened this issue Mar 26, 2024 · 5 comments
Open

Add a "substitute path" option #612

GitMensch opened this issue Mar 26, 2024 · 5 comments

Comments

@GitMensch
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I currently work on a customer performance check. We have a machine that "nearly matches" what the customer has and get actual quite good results in HotSpot already, but for those we have to setup symlinks to exactly match the paths on the customer machine (thge recording has the full path of the libraries in)

Describe the solution you'd like
Provide --substitutePath A:B option for perfparser + hotspot (similar to what GDB offers for source, we can analyze coredumps that way), then later optionally a GUI configuration.

Describe alternatives you've considered
What we currently do:

  • add "our" paths to the "extra libraries" and "debug paths" (no clue why, but it seems it needs both) --> but some symbols are still reported as not being foun
  • create the directory structure of the customer (which includes root folders!), then symlink to the paths on the machine -> this currently gives the best results, but is the most work and in this case even needs sudo...

Additional context
The substitutePath would be used for both binaries and source mappings.

@milianw
Copy link
Member

milianw commented Apr 12, 2024

maybe I misunderstand it, but can't you use a sysroot for that purpose? i.e. just create the mirrored directory structure and then point to that as sysroot?

@GitMensch
Copy link
Contributor Author

You are right that this works and it also works around the root needing a symlink. I'd say the sysroot option is the perfect workaround (not sure that all parts included source lookup uses that, but at least it should).

But a sysroot needs to be complete, no? If yes than this would mean creating even more symlinks and in any case it is more work (creating the directories, then create the symlinks in there) than just specifying one substitute.

@milianw
Copy link
Member

milianw commented Apr 15, 2024

I don't follow. A sysroot needs to be just as complete as your substitute? I mean if you substitute /usr to something else it would also need to include "everything" that the perf.data file accesses.

I'm not saying I don't like the idea of a substitute, but it feels like a super minor thing that you can easily handle with the sysroot already. If you want to work on adding this feature, I'm happy to review patches. But I don't see the need for that myself yet.

@GitMensch
Copy link
Contributor Author

Sounds fair. I totally agree that this makes no sense for substituting /usr but in this use case there are the two folders /app/folder1 and /opt/DB/ora_client/versionN which would be substituted by something under /opt.

@milianw
Copy link
Member

milianw commented Apr 15, 2024

normally you just need /usr from your system so just create a custom "sysroot", symlink that one in, and then add your custom two folders in there and you should be all set?

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

No branches or pull requests

2 participants