Re: Loop profiling



On Mar 28, 11:50 am, Chrisitan Christmann <plfr...@xxxxxxxx> wrote:
On Wed, 28 Mar 2007 16:43:34 +0000, Randy Howard wrote:

Any ideas? Right now, I help myself out with C macros but the
instrumentation is still very tedious.

Well, easy answer would be to write the loop iteration count statistics
to a log file, in a well-defined format that included the function
name, a line number, etc., then have another tool (or even
a shell script using grep intelligently) to pull the data back out and
present it in a more nicely formatted way.

Thank you for your ideas. But, as I understood your ideas, they all
expect the user to add some individual code for each loop under test.
That's what I'm currently doing, but for more complex applications
this becomes a tedious job. This was the reason why I was looking for
an automatic approach, something in the direction of gcov...

There are some tools that might be helpful. For example:
http://covtool.sourceforge.net/
I did a port of this to WIN32 if you want it. It's C++ specific.
It's also aimed at code coverage rather than profile per se, but it
would be a good starting point. It is pretty clever in that it parses
the source code files and does the instrumentation for you.


There are lots of similar things on SourceForge.

.



Relevant Pages

  • Re: process all lines after a match
    ... I would like to check if this log file has at least 3 ocurrences of a ... not exactly, I thought, if I run the script now I have the time. ... change the format then I strongly suggest that you store something like ...
    (comp.unix.shell)
  • Re: process all lines after a match
    ... I would like to check if this log file has at least 3 ocurrences of a ... see if there are 2 or more extra occurrences in the next 4.99999 minutes? ... change the format then I strongly suggest that you store something like ...
    (comp.unix.shell)
  • Re: Backup Question
    ... the information you provided is the log file created by the ... then double-click the Event Viewer snap-in. ... How to Filter Log Events ... Text-file format ...
    (microsoft.public.windows.server.sbs)
  • Re: process all lines after a match
    ... I would like to check if this log file has at least 3 ocurrences of a ... see if there are 2 or more extra occurrences in the next 4.99999 minutes? ... program that converts the logfile to human readable format. ... Then do a tail instead of copying it and remember the line count for the next tail, ...
    (comp.unix.shell)
  • Re: What is the preferred way to parse messages out of a log?
    ... format, provide searching and message grouping by the dialogID. ... the program that generated the log file probably has each of the ... Trunk Group ID: 00000001 ... If you are comfortable with Java tools for XML you might look into ...
    (comp.lang.java.help)