Re: Oprofile support - read symbol table of the binary separately ??
William Cohen <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 09/09/2015 06:44 AM, Srinivas Manem wrote:
> Hi Will,
>
> Thanks for your prompt response.
>
> The use case we had is to profile a program which is stripped for symbols.
> But we can have the debug_info file of the same build.
>
> Going through what you suggested below to move the analysis part to other compatible machine.
> Will it work the following way that I understand ?
That is pretty close.
I don't know which distribution you are building things on. If you are building things as rpms (fedora/suse) then the stripping out and building the debuginfo rpms should be done automatically. The rpmbuild implements something like this URL http://stackoverflow.com/questions/866721/how-to-generate-gcc-debug-symbol-outside-the-build-target
>
> 1. Run the oprofile on my program(without symbols)
> 2. perform 'oparchive' on this profile to collect the profile data, and respective executables and debug_info files.
you should only need to install the debuginfo files on the machine doing the analysis. They are not needed on the machine collecting the data
> 3. Move/transfer the captured data to a Host system.
> 4. install/include the associated debug info to the archied data tree (Though not sure how I can do this !!)
The oparchive builds a directory structure that mirrors the machine that the data was collected on. The root of the unpacked oparchive would be equivalent to the root directory on the machine the data was collected on. If the oparchive top level is at ${oparchive} references to ${debugdir}/${debugfile} link to the debug info would be placed in ${oparchive}/${debugdir}/${debugfile}.
> 5. then run 'opreport' on this archived profiling data
>
> We have the flexibilty to profile the archived data on the same target system, but by adding symbol files to the tree.
Yes, you can do the analysis on the same machine that the data is collected on.
>
> Please let me know if I have gone anything wrong here.
>
> BR
> Srini
-Will
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140