bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] pcprofiledump / xtrace


From: Roger Luethi
Subject: [PATCH] pcprofiledump / xtrace
Date: Fri, 3 May 2002 06:04:25 +0200
User-agent: Mutt/1.3.27i

The two patches you will find attached are related (the second depends on
the first), hence only one message.

Both should be self-explanatory, but here's still a description of what
each patch does:

* glibc-pcprofiledump.c.diff

- Add an option (-u/--unbuffered) so we can get output even with a pipe
  while the program being traced is still running


* glibc-xtrace.sh.diff

- Fixed typo in comment

- Name xtrace fifo xtrace.XXXXXX instead of xprof.XXXXXX

- Set trap to remove fifo if xtrace gets interrupted/terminated

- Fixed typo in code (was "read $fifo" instead of "read < $fifo"); the
  tracing window can now be closed as intended; I also changed the
  printed text slightly to explain in somewhat more details what to do

- Used new feature introduced in patch 1 to create an xtrace version
  that allows live readings; it will show which function is currently
  running, instead of dumping information only once the buffers overflow
  or the program is terminated

- This required an additional while loop because sed is always buffered,
  too; a patch to add an -u option has been sent to the sed maintainers,
  but even if they accept it we can't rely on it being there in the
  forseeable future

Additional notes:
The addr2line that comes with current binutils (2.12) won't find the
line number of the function start in gcc 2.95.3 output (gcc bug, the
work-around for binutils/bfd/syms.c is in CVS). That means that xtrace
prints all zeroes as line numbers until people get new binutils or a
different compiler.

Patches are against current CVS.

Roger

-- 
That old saw about the early bird just goes to show that the worm
should have stayed in bed.

Attachment: glibc-pcprofiledump.c.diff
Description: Text document

Attachment: glibc-xtrace.sh.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]