Re: [PATCH -tip 3/4] perf script: add the option to show the offsetof symbols

From: David Ahern
Date: Thu Jun 30 2011 - 11:42:53 EST


On 06/29/2011 10:44 PM, Akihiro Nagai wrote:
>>>> @@ -346,12 +348,15 @@ static void print_sample_addr(union perf_event
>>>> *event,
>>>> al.sym = map__find_symbol(al.map, al.addr, NULL);
>>>>
>>>> if (PRINT_FIELD(SYM)) {
>>>> - if (al.sym&& al.sym->name)
>>>> + printf(" ");
>>>> + if (al.sym&& al.sym->name) {
>>>> symname = al.sym->name;
>>>> - else
>>>> - symname = "";
>>>
>>> dropping the else path will cause columns to misalign when ip's do not
>>> resolve.
> I see.
> I'd like to add a magic word that indicates perf-script failed to
> resolve the symbol.
> For example, '[unknown]'.

ok. constant number of fields would make secondary analysis tools easier.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/