Re: [PATCH] perf: add callgrind conversion tool

From: Roberto Vitillo
Date: Tue Mar 26 2013 - 14:52:16 EST


>> LIB_OBJS += $(OUTPUT)ui/setup.o
>> LIB_OBJS += $(OUTPUT)ui/helpline.o
>> @@ -528,6 +532,7 @@ BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o
>> BUILTIN_OBJS += $(OUTPUT)builtin-lock.o
>> BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o
>> BUILTIN_OBJS += $(OUTPUT)builtin-inject.o
>> +BUILTIN_OBJS += $(OUTPUT)builtin-convert.o
>
> You can make these conditional after checking availibility of bfd.
Ok

> AFAICS this cg_cnv_sample() does nothing with converting. Why did you
> move the code to a different file rather than keeping it together?
Good point, there isn't really a good reason to have this in a separate file.

> The name of the function doesn't look good to me. Maybe hists__convert_symbols?
Agreed, it's confusing.

>> + /* Needed to display correctly the inlining relationship in kcachegrind */
>> + if (ret_caller && caller_line)
>> + fprintf(output, "fl=%s\n0 0\n", caller_name);
>> +
>> + if (ret_callee && last_line)
>> + fprintf(output, "fl=%s\n", last_source_name);
>> + else
>> + fprintf(output, "fl=\n");
>
> Could you explain why this empty fl line is needed?
Without the empty fl statement kcachegrind would apply the last valid fl
statement in the file.

Thanks,
Roberto
--
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/