mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
88c3bbb88000ca30a12f5de6ca5c5952cf8ddab4
Tue Apr 5 20:13:44 2005 Søren Sandmann <sandmann@redhat.com> * process.c (process_ensure_map): Add commented out debug spew. * process.c (process_lookup_symbol): Remove all should_offset() function and all references to it. * binfile.c (bin_file_lookup_symbol): Document that address must be in file coordinates. * binfile.c (read_symbols): Remove misguided code that tried to guess the load address of the file. Instead, do all computations in "file coordinates". Also fix a memory leak. Add commented out debug spew. * binfile.c (separate_debug_file_exists): Fix signedness
Sysprof is a sampling profiler that uses a kernel module, sysprof-module.ko,
to generate stacktraces which are then interpreted by the userspace
program "sysprof".
- There is no auto* stuff. Just type "make" and hope for the best
- You need gtk+ 2.6.0 or better.
- You need a 2.6 kernel. On SMP kernels the module produces unreliable data.
- The module must be compiled with the same compiler that compiled the
kernel it is going to be used with. For most systems that is just
the system compiler, but if you have upgraded your kernel it is
possible the one was compiled with a difference compiler.
In that case, "insmod sysprof-module.ko" will produce this
error message:
insmod: error inserting './sysprof-module.o': -1 Invalid module format
- The programs you want to profile should have debugging symbols, or
you won't get much usable information. On a Fedora Core system,
installing the relevant -debuginfo packages should do the trick.
- To get usable data on the X server:
(1) Compile the X server to use ".so" modules:
- Uncomment the line "MakeDllModules Yes" in
xc/config/cf/xorgsite.def
- "make World"
(2) Install the X server making sure it can't see any ".a" files. If
you install on top of an existing installation, just do
find /usr/X11R6/lib/"*.a" | sudo xargs rm
and install the newly compiled X server.
If a ".so" X server finds .a files in its module path it will
try to load those in preference to .so files and this causes
symbol resolution problems
(3) Run your new X server
(4) Run sysprof as root. This is necessary because the X server binary
for security reasons is not readable by regular users. I could tell
you why, but then I'd have to kill you.
Credits:
Kristian Høgsberg for the first port to the 2.6 kernel.
Owen Taylor for the symbol lookup code in memprof
Søren (sandmann@daimi.au.dk)
Description
Languages
C
98.9%
Meson
1%