473,769 Members | 2,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Profiling evaluation tools?

Hello,

I want to apologise in advance for this being off topic. It's not neither
A C nor a C++ question, but to profiling in general, though I my chances
are best to find the answer in the C/C++ community.

I have a C++ program to profile and went about it by producing large
history files of calling dependencies with associated times. It is
presumably similar to gprof's data format and could be converted.

I'm now looking for utilities that can evaluate such a tree. I only
looked at the gprof's manual page and that seemed too basic to me.

I already wrote some Python scripts that can extract stuff like:

- Break the time down into that spent in each (libraries, files,
functions, ...), exclusive to that spent on their behalf in other
such entities. Print it in order.

- Give a tree of (libraries, files, functions) according to their
calling dependencies, but don't recurse into those subentities below
a certain threshhold of consumed time. Give the number of calls and
time (including the time spent in subentities).

All this is already quite useful, but I also dearly want to have:

- My script is already "merging together" subtrees on the same
level. For instance, if f calls g a number of times, and g h a
number of times, you only get f->g->h once in the tree view of the
data, the number at the line of h being the total calls to h through
this callchain. However, if a call to f occurs at a number of
different places in the code, those occurences will not be merged
together: I can't say, view any call to f as a the "whole program"
and forget other calls, merging all these subtrees into one.

- I have a general structure of attributes to each node (ie library, file
and function names), but I also want to have additional attributes like
the value of a parameter the function was called with, which may only
apply to some functions. I need to filter out certain values of these
attributes or break down to their values.

- Reverse tree view: Given a (library, file, function), how often was
it called and how much time did it spend on the behalf of all it's
calling parent, grandparents, etc., again breaking recursion on a
certain time threshold. A special case of this is the ability to
extract a backtrace from the profiling data, which is useful on it's
own.

I have a number of vague ideas how to go about this.

My scripts are in Python, but they are messy and slow. An exotic
approach would be xslt, since it's designed to operate on tree-data. I
have zero experience in this regard - is this possible? how does it
perform? Another one is trying to use databases as a storage for
trees, but I'm not sure if all of these operations will be efficient.

The most realistic option I would go about in the absence of further
advice and existing utilities is to rewrite my scripts in C++.

All of this needs properly thinking through, so I'd really much rather
use an exisiting solution. Is there one?

Cheers,

Jens

Feb 15 '06 #1
13 2283
Jens Theisen wrote:
Hello,

I want to apologise in advance for this being off topic. It's not neither
A C nor a C++ question,
If you know it is not a C or C++ question and know it is therefor off
topic here, don't ask it here.
but to profiling in general, though I my chances
are best to find the answer in the C/C++ community.
No, you are most likely to get complained at for posting in what you
know is the wrong place.
I have a C++ program to profile and went about it by producing large
history files of calling dependencies with associated times. It is
presumably similar to gprof's data format and could be converted.


<snip>

Since you are using GNU tools, try asking in GNU mailing lists.
Alternatively try asking in a more general group or an OS specific
group. Don't ask in what you *know* is the wrong group.
--
Flash Gordon
Living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidlines and intro -
http://clc-wiki.net/wiki/Intro_to_clc
Feb 15 '06 #2
Ico
In comp.lang.c Jens Theisen <jt***@arcor.de > wrote:

I have a C++ program to profile and went about it by producing large
history files of calling dependencies with associated times. It is
presumably similar to gprof's data format and could be converted.

[... snipped a lot of requested features ...]

<offtopic answer following>

If you happen to work on linux, take a look at the excellent callgrind
and kcachegrind tools. Callgrind is a tool that runs your code in a
virtual machine. It can do profiling, call tracing, cache profiling and
a lot more. Kcachegrind is a gui for showing the profiling results in
various ways.

http://kcachegrind.sourceforge.net/cgi-bin/show.cgi
--
:wq
^X^Cy^K^X^C^C^C ^C
Feb 15 '06 #3
Flash wrote:
Since you are using GNU tools, try asking in GNU mailing lists.
Alternatively try asking in a more general group or an OS specific
group. Don't ask in what you *know* is the wrong group.


An OS specific group would be just as wrong, since it's not an OS specific
problem.

I searched for newsgroups or mailinglists for profiling related talks but
failed in finding them.

I don't know what the right group is to ask, and obviously you don't
either.

Jens

Feb 15 '06 #4
Ico wrote:
http://kcachegrind.sourceforge.net/cgi-bin/show.cgi


That's indeed an interesting start, thank you very much!

Jens

Feb 15 '06 #5
On 15 Feb 2006 13:27:00 +0000, in comp.lang.c , jt***@arcor.de (Jens
Theisen) wrote:
Flash wrote:
Since you are using GNU tools, try asking in GNU mailing lists.
Alternatively try asking in a more general group or an OS specific
group. Don't ask in what you *know* is the wrong group.


An OS specific group would be just as wrong, since it's not an OS specific
problem.


The thing is, there is NO generic C answer to this as its a toolset
thing, not a C thing. You need to ask in a group specialising in each
OS or toolset you're interested in. From your original post, you are
interested in only one OS and toolset, so ask over there.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Feb 15 '06 #6
Mark wrote:
The thing is, there is NO generic C answer to this as its a toolset
thing, not a C thing. You need to ask in a group specialising in each
OS or toolset you're interested in. From your original post, you are
interested in only one OS and toolset, so ask over there.
Mark McIntyre


I think my original posting was very clear in that it's not at all
specific to a certain toolset.

Jens

Feb 15 '06 #7
Jens Theisen wrote:
Mark wrote:
The thing is, there is NO generic C answer to this as its a toolset
thing, not a C thing. You need to ask in a group specialising in each
OS or toolset you're interested in. From your original post, you are
interested in only one OS and toolset, so ask over there.
Mark McIntyre


I think my original posting was very clear in that it's not at all
specific to a certain toolset.


Maybe not, but the solution necessarily must be. Either the
compiler/runtime system has special provisions, or you must distort
the original source code to inject something or other. You don't
have a namespace to play in, since things are either reserved for
the implementation or for the user.

--
"The power of the Executive to cast a man into prison without
formulating any charge known to the law, and particularly to
deny him the judgement of his peers, is in the highest degree
odious and is the foundation of all totalitarian government
whether Nazi or Communist." -- W. Churchill, Nov 21, 1943
Feb 15 '06 #8
jt***@arcor.de (Jens Theisen) writes:
Flash wrote:
Since you are using GNU tools, try asking in GNU mailing lists.
Alternatively try asking in a more general group or an OS specific
group. Don't ask in what you *know* is the wrong group.


An OS specific group would be just as wrong, since it's not an OS specific
problem.

I searched for newsgroups or mailinglists for profiling related talks but
failed in finding them.

I don't know what the right group is to ask, and obviously you don't
either.


That doesn't imply that *this* is the right group.

You might try comp.programmin g.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 15 '06 #9
Jens Theisen wrote:
Flash wrote:
Since you are using GNU tools, try asking in GNU mailing lists.
Alternatively try asking in a more general group or an OS specific
group. Don't ask in what you *know* is the wrong group.
An OS specific group would be just as wrong, since it's not an OS specific
problem.


Many OS specific groups deal with tool chains.
I searched for newsgroups or mailinglists for profiling related talks but
failed in finding them.

I don't know what the right group is to ask, and obviously you don't
either.


There are a number of possible general groups including alt.comp.misc
which from the name is a very general group to comp.programmer which is
another very general group amongst others. Is it really so hard to try a
generalist group when you can't find a specific group?

Would you go in to a Hi-fi shop and ask for advice on how to repair a
printer just because you can't find a printer specialist, or would you
go in to a general computer repair centre? They both have a lot of
electronics in, after all.
--
Flash Gordon
Living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidlines and intro -
http://clc-wiki.net/wiki/Intro_to_clc
Feb 15 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2048
by: Charles Law | last post by:
I have seen people ask this before, and I think I have as well. The question is: specifically, what third-party tools or built-in .NET features exist for profiling .NET applications? The answers I have seen before seem to refer generally to the existence of such tools, but do not mention names. The particular scenario is: I have a VB.NET application, which, under certain circumstances causes the CPU activity to disappear off the scale....
3
10982
by: Richard Wallace | last post by:
Hello all, I'm looking for some input on the best tools to use for profiling multithreaded C++ code developed on GNU/Linux and compiled using gcc-3.1. More specifically, the distro in use is RH 7.2 running kernel 2.4.7 with SMP. The box has dual processors. Some of the options I've found are gprof - standard GNU profiler that comes with gcc. The biggest problem with this is that it does not support multithreading or
5
1733
by: rawCoder | last post by:
hi, I would like to profile an application using some tool in such a way that i dont want to add any probe code in the application. And I am also interested in knowing the lines of codes that are hit/run most of the times and also the lines of code which took most time in execution. ( as it is said that 20% of your code takes 80% of the execution time ) What are the good tools/techniques for profiling in .NET ( which dont
14
373
by: Jens Theisen | last post by:
Hello, I want to apologise in advance for this being off topic. It's not neither A C nor a C++ question, but to profiling in general, though I my chances are best to find the answer in the C/C++ community. I have a C++ program to profile and went about it by producing large history files of calling dependencies with associated times. It is presumably similar to gprof's data format and could be converted.
0
2585
by: L'eau Prosper Research | last post by:
Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market Manipulation Profiling Tools Set is a set of advanced tools that help Serious Traders analyze the market direction, market manipulative behavior and predicting the change of trend.
0
2350
by: L'eau Prosper Research | last post by:
NEW TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set By L'eau Prosper Research Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market Manipulation Profiling Tools Set is a set of
9
1804
by: Peter Duniho | last post by:
I'm especially hoping Ben Voigt and/or Bob Powell see this (I saw their names on the m.p.d.f.performance newsgroup :) ) I would have posted to the performance newsgroup, but I see very little on there that actually seems to relate to the _tools_ per se while this newsgroup is actually somewhat related to the tools, and most of the useful answers come from people known to frequent this newsgroup anyway, so... :) My basic question: I...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5307
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3964
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3564
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.