On 14.10.2011 17:42, Igor Galić wrote:
> To summarize: I'm trying to get a call-graph for Apache Traffic Server
> for documentation purposes. In this sense I don't care about how long
> a function call takes. If it's part of our source base, it's relevant
> to me. Thus, I would like to filter out all calls which stem from
> external libraries, such as libc, libtlc, libcrypto, etc...
Ok.
> Is there any way I can achieve this with vallgrind/callgrind?
The callgrind output has every call which happened while running.
So at least, this would be a good basis.

> Is there any way I can achieve this with kcachegrind?
When kcachegrind wants to show the call graph, it limits the scope
to show. It should be straight forward to modify the source to add
a way to stop the call graph when it crosses library borders.

See
  
http://websvn.kde.org/trunk/KDE/kdesdk/kcachegrind/libviews/callgraphview.cpp?view=markup

The function to look at is GraphExporter::buildGraph (line 953 ff.).
It could be enough to just add at the beginning:

      if (f->object() != ((TraceFunction*)_item)->object()) return;


>   Or any
> other tool?
No idea.
> Is there a standard way I can, manually or (preferably) automatically
> transform callgrind's output, before further transforming it to
> dot format?

You mean get rid of all calls crossing library borders?

In the callgrind format, a line starting with "ob=" specifies the 
library from
which calls are done (the rest of the line), and "cob=" the target 
library of
following calls, with "cob=" defaulting to the previous "ob=" if not 
explicitly given.
Thus, you could write a PERL/Phython script which maintains current
ob/cob values, and for lines starting with "calls=", just throw them away if
cob and ob are not the same.
And you need to use "--compress-strings=no" for callgrind for this to work.

So long,
Josef

>
> I think that's enough questions for now (:
>
> Thank you very much in advance.
>
> So long,
> i
>


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to