|
Home > Archive > Unix Programming > January 2006 > line by line tracing (gprof? not sure what to use)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
line by line tracing (gprof? not sure what to use)
|
|
|
| I would like to be able to run a simple C program and have some tracer
or profiler log each time the C program line changes (timestamp the
event, etc). then I'd like to have that log be shown in a text edit
window (something graphical) that would highlight the lines that were
'hit' during the run. it would be nice to number the lines by the
order they were run in (that's 2 columns: the physical line # and the
order of execution number).
seems simple - seems like there should be some already-made solutions
for this (assuming unix, gcc, etc) - but I haven't found anything yet.
anyone have any ideas?
my dream solution would be to run a program that has been somehow
instrumented, have this logfile be simple enough so that I could load
it in emacs along with the source file and it could highlight the lines
that were run, based on that logfile. just a quick way to sort out
which are the 'cold' sections of code during a particular run.
TIA,
/bryan
| |
| Pascal Bourguignon 2006-01-15, 5:52 pm |
| "lw" <linux.works@gmail.com> writes:
> I would like to be able to run a simple C program and have some tracer
> or profiler log each time the C program line changes (timestamp the
> event, etc). then I'd like to have that log be shown in a text edit
> window (something graphical) that would highlight the lines that were
> 'hit' during the run. it would be nice to number the lines by the
> order they were run in (that's 2 columns: the physical line # and the
> order of execution number).
>
> seems simple - seems like there should be some already-made solutions
> for this (assuming unix, gcc, etc) - but I haven't found anything yet.
> anyone have any ideas?
>
> my dream solution would be to run a program that has been somehow
> instrumented, have this logfile be simple enough so that I could load
> it in emacs along with the source file and it could highlight the lines
> that were run, based on that logfile. just a quick way to sort out
> which are the 'cold' sections of code during a particular run.
Google for: profile and coverage
--
__Pascal Bourguignon__ http://www.informatimago.com/
NEW GRAND UNIFIED THEORY DISCLAIMER: The manufacturer may
technically be entitled to claim that this product is
ten-dimensional. However, the consumer is reminded that this
confers no legal rights above and beyond those applicable to
three-dimensional objects, since the seven new dimensions are
"rolled up" into such a small "area" that they cannot be
detected.
|
|
|
|
|