You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apisix.apache.org by "dalehamel (via GitHub)" <gi...@apache.org> on 2023/02/09 22:31:11 UTC

[GitHub] [apisix-profiler] dalehamel opened a new pull request, #4: WIP fixing profiling nginx in a container

dalehamel opened a new pull request, #4:
URL: https://github.com/apache/apisix-profiler/pull/4

   This is a draft, not ready for review yet.
   
   I was attempting to use this tool to profile an nginx instance running in a container, but many of the ELF helpers don't understand how to deal with containerized paths.
   
   The fix for this is relatively simple, we just prepend `/proc/PID/root` to the paths, to make them relative to the target pid's mount namespace.
   
   Since the helpers don't take a `pid`, for now I've hacked it by adding a static variable and storing this early on when we are looking for the lib / binary to profile.
   
   After these changes, I am able to profile an nginx instance running in a container, provided I have access to the root pid namespace.
   
   I also discovered an issue with the makefile, which I will PR separately but is currently included in this branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org