Project

General

Profile

Actions

Feature #1045

open

Wire up debug info on lttng_ust_cyg_profile event fields

Added by Mathieu Desnoyers over 8 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/13/2016
Due date:
% Done:

0%

Estimated time:

Description

#lttng paste

09:56 < rnsanchez> is there a default procedure for "hydrating" instrument-functions traces like this?
09:56 < rnsanchez> [13:54:09.866652414] (+0.000001178) priminho lttng_ust_cyg_profile:func_exit: { cpu_id = 1 }, { addr = 0x46BB90, call_site = 0x46BF7B }
09:56 < rnsanchez> (kind of replacing the addr with their proper symbols)
09:57 < milian> rnsanchez: I'm not an lttng dev, but could imagine that one would be able to write that by analyzing mmap + openat to find the offset into a library, which you can then feed into addr2line, or libdw/libbacktrace
09:59 < rnsanchez> I could propably pass it (babeltrace) through some script to do that. but since the trace is huge (and this is not even a "real" trace), I was wondering if there is a better way to do that
09:59 < milian> I'd also be interested in that
10:00 < rnsanchez> well maybe there is one. building a symbol-table cache for the known things (a binary of special interest) and then feeding babeltrace through awk, replacing the symbols found with their names
10:01 < rnsanchez> some would miss, of course, but perhaps a good amount would help
10:46 < Compudj> rnsanchez, milian: currently, babeltrace is a bit "hardwired" to the "ip" context for symbol resolution
10:46 < Compudj> but all the infrastructure code is there
10:49 < Compudj> see babeltrace: formats/ctf-text/types/integer.c
10:49 < Compudj> there is a call to ctf_text_integer_write_debug_info
10:50 < Compudj> implemented in include/babeltrace/trace-debug-info.h
10:50 < Compudj> it checks if integer_definition->debug_info_src is non-null
10:51 < Compudj> this is wired up in lib/debug-info.c register_event_debug_infos()
10:51 < Compudj> it is where it is tied to the "ip" context
10:51 < Compudj> it should be extended to be tied to the lttng_ust_cyg_profile event fields too

Actions

Also available in: Atom PDF