Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] LTTng-UST with custom trace points

Hi Dominic,

Thanks for reporting this, you're not the first one. See this bug for instance [1]. That's something we'll highly likely work on soon. But in the very short term, your best option is to manually edit the metadata file of your trace, to fool it into thinking you are using lttng-ust 2.7-. Near the beginning of the file, there is an "env" element, with hostname, domain and the tracer info. You can change the tracer_minor to 7 and the option to import function name mapping will be available.




On 2017-05-14 10:58 PM, Dominic Walsh wrote:

I would like to effectively use "-finstrument-functions" but only in selected scopes in my code. I cannot really afford to partition this code into separate files which my build system could feed the compiler directive.  Also it would still leave me instrumenting std::find etc ...

I tried this by inserting a simple lifetime object into some scopes via a macro. On construction this object calls __cyg_profile_func_enter and on destruction calls __cyg_profile_func_exit. These need an address so I passed the address of a static char* inserted by the same macro which was set to the "function name". At the end of my process I write all this addresses to a file to create my function name mapping file. 

All goes well when I bring up TraceCompass - I can see my call stack, with bogus addresses. However, I try import my mapping file TraceCompass only seems to want me to point to a binary. I am using LTTng 2.9 - is the file option disabled? I was hoping I wouldn't have to post-process the CTF output.



tracecompass-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top