Am 23.08.2014 um 14:56 schrieb Dan Liew:
>> The instruction address you specify below is always the same as the line
>> number. That makes not much sense. The instruction address is needed
>> for KCachegrind to show annotated machine code, using "objdump <binary>",
>> but your example does not specify a binary file using "ob=" anywayl
> 
> On a slightly related note is it possible to specify an assembly file
> rather than an object file? For example If I had a C program (say
> foo.c) and its corresponding LLVM IR (foo.ll). I would like to display
> both the C source code and the foo.ll file. When I tried using
> obj=foo.ll however KCachegrind tried using objdump on that file and
> gave up because foo.ll is just text and not a binary.

Currently there is no such option, and the "instr" subposition was meant
to be used with objdump.

Perhaps it would be interesting to have a KCachegrind config option
(or specified in the header of a callgrind file)
which specifies what to do with a specific subposition type, instead of
running it through "objdump". Not sure yet what would cover most use
cases. For you, just the file and line number would be enough?

>> ...
> That probably ought to be documented.

Sure. The jumps were one of the last additions to the file format, and
it just never was documented correctly.

> It's not obvious that it is
> needed. I'm also surprised that the position of the jump isn't
> specified on the same line.

I wanted that to be similar to the calls= spec, and was not sure
if some cost attributes may be useful to jumps as well (which currently
is empty).
But details do not matter; documentation is important.

>> By the way, if your jump crosses a source file or a function,
>> you may specify the source file of the jump target with "jfi=" and
>> the target function name with "jfn=" before a the "jump="/"jcnd" line.
> 
> Thanks. Like ``cfn=`` does that change the function that subsequent
> cost lines are in?
> 
> I don't see these in the documentation either so it would be nice if
> they were documented.

See above. Currently the documentation is in the (KCachegrind) source :(

Josef


> 

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to