Commit Graph

478 Commits

Author SHA1 Message Date
ecf6cf715f Makefile.am: barrier.h is now called util.h 2010-05-06 13:09:06 +03:00
119b710ffc Fix use of uninitialized variable 2010-04-24 12:27:32 -04:00
c960ebd52f Use the SET_OUTPUT ioctl to direct all output to the same buffer
This ensures that we don't get events out of order, which will make
the profiles look a lot less bogus on multi-core systems.
2010-04-24 10:50:26 -04:00
539c3a8754 Make comm events reuse any existing process.
A comm event doesn't necessarily mean a new process was created. It
may just mean that an existing process changed its command line.
2010-04-24 10:27:27 -04:00
73922a0af9 Eliminate some compiler warnings 2010-04-23 11:56:14 -04:00
a03172b11f Use d_print() instead of g_print() for debug spam 2010-04-23 11:56:14 -04:00
298f92ff20 Add FIXME about performance issue in stack_stash_add_trace() 2010-04-23 11:56:14 -04:00
ded375462b sysprof-cli: Print out number of samples when saving 2010-04-23 11:56:14 -04:00
aab051f944 Fix encoding of error message
Use g_strerror instead of strerror to get UTF-8
2010-03-23 18:09:14 +01:00
4e77734d49 Fix build with -Werror=format-security
Don't use dynamic string as format, one of the args could be a string
containing %.
2010-03-23 17:21:37 +01:00
b957f30379 Really disable hardware counters. 2010-03-21 12:14:33 -04:00
2d5cf4c93f Ignore fork events that are just new threads being spawned.
These would cause mysterious new processes to show up.
2010-03-10 06:58:22 -05:00
08d4d26060 Disable use of hardware perf counters.
They don't seem to actually work on a lot of hardware.
2010-03-09 12:27:49 -05:00
1707bebe93 Stop using double mmap trick.
It has issues on various architectures, such as ARM, and there was
never any guarantee that it would actually work. So since we'd need
fallback code anyway, and the main point of it was simplifying the
code, just get rid of it and handle the overflow conditions manually.
2010-03-09 12:27:43 -05:00
001d3b8e42 Update list of kernel symbols to take counter->event rename into account. 2010-02-20 15:04:35 -05:00
b82c3fa806 Coding style fix 2010-02-08 13:20:58 -05:00
Nix
106a734c4f Wire up __NR_perf_counter_open syscall for almost all arches as of
Currently, sysprof hardwires the syscall number of
__NR_perf_counter_open. That's all very well, except... like other
syscall numbers, it varies per-arch. With a few exceptions
(e.g. sparc64), it even varies between 32-bit and 64-bit x86 arches.

This patch provides the defines for every number I could see assigned
in git trunk right now, with the exception of some of the ARM ones, where
I couldn't see how to differentiate between the various sorts of ARM to
figure out what the syscall base was. For those, let's wait for libc to
catch up.

The only arch I've been unable even to guess at is the very new S-Core,
which is the only user so far of the generic syscall table in
<include/asm-generic>. This specifies a value of 241, but I can't hook
it up because I can't find an S-Core toolchain anywhere so I don't know
what #define to check for, and googling gives no clues.

Only tested on x86-64 (where it now works) so there may be all sorts of
bugs in the rest of it (well, in the #defines anyway, though most were
checked against GCC trunk).
2010-02-08 13:16:00 -05:00
3e4921b92d Unconditionally fall back to software if opening hardware counters fails
If hardware counters are not available, fall back to SW regardless of
why the hardware counters aren't available. The error code can be
either ENOTSUPP or ENODEV depending on CPU type, so it's simpler to
just retry in all cases, and only fail if the software fallback
failed.
2010-02-01 14:02:41 -05:00
16f11912e2 Remove deprecated Glib symbols 2009-11-03 20:08:15 +01:00
506f06cc99 Use GTK+ single includes 2009-11-03 20:08:03 +01:00
fbf052a482 Support silent build rules with automake 1.11
Support silent build rules, requires at least automake-1.11.
Disable by either passing --disable-silent-rules to configure or
passing V=1 to make.
2009-11-03 20:01:16 +01:00
18695c27f1 Post release version bump 2009-11-02 14:16:26 -05:00
4ccb67dca9 Release 1.1.4 2009-11-02 14:15:23 -05:00
ef2da92b0a More error handling. 2009-11-02 13:52:11 -05:00
71f2cd3a64 Return error when the counter can't be opened. 2009-11-02 13:30:04 -05:00
1b64f1d924 Also filter out NMI stack 2009-10-29 07:40:51 -04:00
ae77f078d3 Skip symbols from IRQ stack.
There is a bug in the kernel where it includes the stack of the IRQ
that generated the event, so that the stack ends up looking like this:

	[ip] [irq stack] [real stack].

As a temporary workaround, this patch filters out the irq stack
symbols.
2009-10-29 07:31:31 -04:00
7fc23589a2 Exclude idle events and set sample_period to 200000 2009-10-23 13:42:11 -04:00
70d03f4bf2 Set wakeup_events to 149, not 150 2009-10-21 12:31:43 -04:00
0abcd98e2a TODO 2009-10-21 12:30:32 -04:00
ecb15e0b7f Show the "-- kernel --" marker in kernel threads
The innermost context is normally user mode, so we don't show. For
kernel threads, the innermost context is the kernel, so don't filter
it out.
2009-10-21 12:28:43 -04:00
393a26dad6 Disable accessibility
Accessibility prevents sysprof from working reliably, so disable
it. Specifically, it

- causes large amounts of time to be spent in sysprof itself
  whenever the label is updated.

- sometimes hangs at shutdown

- does long-running roundtrip requests that prevents
  reading the event buffers, resulting in lost events.
2009-10-21 12:27:19 -04:00
2c4422c46e Make the events more compact by packing type and pid into one uint32_t. 2009-10-21 08:57:08 -04:00
432cd9ce55 Add support for software fallback counters 2009-10-21 06:58:20 -04:00
2c8638d3f3 TODO 2009-10-21 06:57:29 -04:00
7836e72295 Remove final bits of binparser 2009-10-08 19:26:44 -04:00
ca14021fb3 Eliminate more BinParser stuff 2009-10-08 19:17:24 -04:00
4f9903b913 Beginning of the end for BinParser.
Instead of the clunky BinParser, we are moving to a scheme where the
ELF accessors are defined by macros. This is the first step towards
getting rid of it.
2009-10-08 17:40:20 -04:00
33fdd6cda3 Pre-release version bump 2009-09-26 09:56:33 -04:00
f871ceb3d3 Remove GSEAL macros 2009-09-25 12:47:55 -04:00
79107145c0 Really make it compile on older kernels 2009-09-25 11:50:08 -04:00
626078e873 Make it distcheck
Also add a warning about compiling against a too old kernel.
2009-09-25 11:37:26 -04:00
8df1145c84 Comment out some debugging spam; update copyright 2009-09-25 11:24:40 -04:00
9072f891fd Eliminate 'partial' string 2009-09-24 10:46:59 -04:00
8771972212 In sysprof-cli.c, stop the collector before trying to create a profile 2009-09-16 08:22:18 -04:00
a33678df26 Update TODO 2009-09-14 04:59:28 -04:00
08fc4f64a9 Read data before stopping collector.
Stop debug spew.
2009-09-11 04:07:11 -04:00
3bd9debb5c TODO 2009-09-10 03:08:16 -04:00
09ffea0d57 TODO, plus a number of other fixes 2009-09-08 19:35:03 -04:00
75c5a39c72 Avoid mallocs in process_sample() 2009-09-08 03:24:46 -04:00