platform/upstream/sysprof.git
11 years agoDon't try to distribute perf_counter.hf
Søren Sandmann Pedersen [Sat, 8 Sep 2012 18:08:57 +0000 (14:08 -0400)]
Don't try to distribute perf_counter.hf

11 years agoAdd announce-1.2
Søren Sandmann Pedersen [Sat, 8 Sep 2012 18:05:31 +0000 (14:05 -0400)]
Add announce-1.2

11 years agoUpdate releasing
Søren Sandmann Pedersen [Sat, 8 Sep 2012 18:05:15 +0000 (14:05 -0400)]
Update releasing

11 years agoFix description in the DOAP file
Søren Sandmann Pedersen [Mon, 3 Sep 2012 20:54:11 +0000 (16:54 -0400)]
Fix description in the DOAP file

11 years agoInclude <linux/perf_event.h> instead of our own old copy
Søren Sandmann Pedersen [Mon, 3 Sep 2012 20:17:56 +0000 (16:17 -0400)]
Include <linux/perf_event.h> instead of our own old copy

At this point, we can require the perf_event.h file to be shipping
with the kernel that we are compiling against.

12 years agoFix debug link crc reading
Pauli Nieminen [Mon, 9 Apr 2012 18:13:00 +0000 (21:13 +0300)]
Fix debug link crc reading

Debug link crc values is strored after null terminated string in 4
aligned offset. But sysprof was only taking into accoutn alignment
that made elf parser read wrong crc from the debug link string.

Fix is simple check for string length and adding the length to offset
before alignment.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
12 years agoAdd test for debug link parsing
Pauli Nieminen [Mon, 9 Apr 2012 18:13:01 +0000 (21:13 +0300)]
Add test for debug link parsing

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
12 years agoDon't complain about old kernel for 3.0+ kernels
Pauli Nieminen [Mon, 9 Apr 2012 18:12:59 +0000 (21:12 +0300)]
Don't complain about old kernel for 3.0+ kernels

Linux kernel version received bump to 3.0 that causes configure to
complain about older kernel. To avoid the warning configure needs to
check major and minor versions before micro.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
12 years agoProtect against NULL sym string.
Jeffrey Stedfast [Wed, 21 Dec 2011 02:52:35 +0000 (21:52 -0500)]
Protect against NULL sym string.

12 years agoAdd doap file
Søren Sandmann Pedersen [Thu, 1 Sep 2011 00:13:30 +0000 (20:13 -0400)]
Add doap file

12 years agoFix PowerPC checks for __NR_perf_counter_open.
Michel Dänzer [Sat, 27 Aug 2011 18:04:44 +0000 (20:04 +0200)]
Fix PowerPC checks for __NR_perf_counter_open.

__ppc__ isn't defined here on Debian powerpc. Grepping through the headers
installed in /usr/include, there are a few references to __ppc__ and
__ppc64__, but I suspect they're for other OSs.

Signed-off-by: Michel Dänzer <michel@daenzer.net>
12 years agoAdd a simple testdemangle.c test program
Søren Sandmann Pedersen [Wed, 31 Aug 2011 23:57:33 +0000 (19:57 -0400)]
Add a simple testdemangle.c test program

13 years agoPost-release version bump
Søren Sandmann Pedersen [Fri, 15 Jul 2011 16:57:32 +0000 (12:57 -0400)]
Post-release version bump

13 years agoPre-release version bump to 1.1.8 1.1.8
Søren Sandmann Pedersen [Fri, 15 Jul 2011 16:47:02 +0000 (12:47 -0400)]
Pre-release version bump to 1.1.8

13 years agotracker: Fix the map look up
Damien Lespiau [Wed, 13 Jul 2011 14:03:13 +0000 (15:03 +0100)]
tracker: Fix the map look up

A few commits ago, an attempt to speed the map look up was done.
Unfortunatly, it was missing the case where you actually hit the speed
up (once the map is the first element of the array, you never return
it).

So, make sure that if i is 0, you return the first element of array,
while still doing the array reordering is i > 0.

13 years agocli: Allow to get samples from single pid
Damien Lespiau [Fri, 21 Jan 2011 11:01:24 +0000 (11:01 +0000)]
cli: Allow to get samples from single pid

perf lets you decide to only get events that concerns a single process
and thus make sysprof profile this process instead of the whole system
(it can happen that you don't really care about other processes that are
just then noise).

As a side effect, this allows sysprof to not run as root if you have the
rights on the process you want to profile.

13 years agotracker: Silence a debug message
Damien Lespiau [Fri, 21 Jan 2011 10:56:19 +0000 (10:56 +0000)]
tracker: Silence a debug message

The same way than the other ones, with #if 0.

13 years agoAdd a .gitignore file
Damien Lespiau [Fri, 21 Jan 2011 10:56:17 +0000 (10:56 +0000)]
Add a .gitignore file

Hooray for a clean git status!

13 years agoSpeed up map locating in tracker.c
Søren Sandmann Pedersen [Tue, 9 Nov 2010 11:32:14 +0000 (06:32 -0500)]
Speed up map locating in tracker.c

Store the maps as a GArray rather than a GPtrArray to improve
locality; also move maps to front when they are looked up.

13 years agoDon't compute CRC32s that we know will fail.
Søren Sandmann Pedersen [Tue, 9 Nov 2010 06:40:16 +0000 (01:40 -0500)]
Don't compute CRC32s that we know will fail.

If two files both have build-ids and those build-ids don't match,
there is no point computing the CRCs.

13 years agofootreestore: Eliminate some type checks that were showing up on profiles
Søren Sandmann Pedersen [Tue, 9 Nov 2010 06:39:25 +0000 (01:39 -0500)]
footreestore: Eliminate some type checks that were showing up on profiles

13 years agoCall gdk_flush() in set_busy().
Søren Sandmann Pedersen [Fri, 5 Nov 2010 04:21:17 +0000 (00:21 -0400)]
Call gdk_flush() in set_busy().

Otherwise, the cursor won't show up. (GTK+ 2.22).

13 years agoRight align the samples label
Søren Sandmann Pedersen [Fri, 5 Nov 2010 04:20:58 +0000 (00:20 -0400)]
Right align the samples label

13 years agobuild: Update autotools configuration a bit
Javier Jardón [Mon, 24 Jan 2011 23:11:40 +0000 (23:11 +0000)]
build: Update autotools configuration a bit

13 years agoRemove INSTALL file, It's autogenerated
Javier Jardón [Mon, 24 Jan 2011 23:05:15 +0000 (23:05 +0000)]
Remove INSTALL file, It's autogenerated

13 years agoautogen.sh: Use autoreconf
Javier Jardón [Mon, 24 Jan 2011 23:02:59 +0000 (23:02 +0000)]
autogen.sh: Use autoreconf

14 years agoPost-release version bump to 1.1.7
Søren Sandmann Pedersen [Thu, 6 May 2010 10:13:11 +0000 (13:13 +0300)]
Post-release version bump to 1.1.7

14 years agoPre-release bump to 1.1.6 1.1.6
Søren Sandmann Pedersen [Thu, 6 May 2010 10:11:22 +0000 (13:11 +0300)]
Pre-release bump to 1.1.6

14 years agoMakefile.am: barrier.h is now called util.h
Søren Sandmann Pedersen [Thu, 6 May 2010 10:09:06 +0000 (13:09 +0300)]
Makefile.am: barrier.h is now called util.h

14 years agoFix use of uninitialized variable
Søren Sandmann Pedersen [Sat, 24 Apr 2010 16:27:32 +0000 (12:27 -0400)]
Fix use of uninitialized variable

14 years agoUse the SET_OUTPUT ioctl to direct all output to the same buffer
Søren Sandmann Pedersen [Sat, 24 Apr 2010 14:49:18 +0000 (10:49 -0400)]
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.

14 years agoMake comm events reuse any existing process.
Søren Sandmann Pedersen [Sat, 24 Apr 2010 14:27:27 +0000 (10:27 -0400)]
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.

14 years agoEliminate some compiler warnings
Søren Sandmann Pedersen [Fri, 23 Apr 2010 15:53:46 +0000 (11:53 -0400)]
Eliminate some compiler warnings

14 years agoUse d_print() instead of g_print() for debug spam
Søren Sandmann Pedersen [Fri, 23 Apr 2010 15:34:07 +0000 (11:34 -0400)]
Use d_print() instead of g_print() for debug spam

14 years agoAdd FIXME about performance issue in stack_stash_add_trace()
Søren Sandmann Pedersen [Fri, 23 Apr 2010 15:26:17 +0000 (11:26 -0400)]
Add FIXME about performance issue in stack_stash_add_trace()

14 years agosysprof-cli: Print out number of samples when saving
Søren Sandmann Pedersen [Fri, 23 Apr 2010 15:22:06 +0000 (11:22 -0400)]
sysprof-cli: Print out number of samples when saving

14 years agoFix encoding of error message
Pascal Terjan [Tue, 23 Mar 2010 17:09:14 +0000 (18:09 +0100)]
Fix encoding of error message

Use g_strerror instead of strerror to get UTF-8

14 years agoFix build with -Werror=format-security
Pascal Terjan [Tue, 23 Mar 2010 16:21:37 +0000 (17:21 +0100)]
Fix build with -Werror=format-security

Don't use dynamic string as format, one of the args could be a string
containing %.

14 years agoReally disable hardware counters.
Søren Sandmann Pedersen [Sun, 21 Mar 2010 16:12:42 +0000 (12:12 -0400)]
Really disable hardware counters.

14 years agoIgnore fork events that are just new threads being spawned.
Søren Sandmann Pedersen [Wed, 10 Mar 2010 11:58:22 +0000 (06:58 -0500)]
Ignore fork events that are just new threads being spawned.

These would cause mysterious new processes to show up.

14 years agoDisable use of hardware perf counters.
Søren Sandmann [Tue, 9 Mar 2010 17:06:36 +0000 (12:06 -0500)]
Disable use of hardware perf counters.

They don't seem to actually work on a lot of hardware.

14 years agoStop using double mmap trick.
Søren Sandmann [Tue, 9 Mar 2010 16:59:00 +0000 (11:59 -0500)]
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.

14 years agoUpdate list of kernel symbols to take counter->event rename into account.
Søren Sandmann Pedersen [Sat, 20 Feb 2010 20:04:35 +0000 (15:04 -0500)]
Update list of kernel symbols to take counter->event rename into account.

14 years agoCoding style fix
Søren Sandmann Pedersen [Mon, 8 Feb 2010 18:20:58 +0000 (13:20 -0500)]
Coding style fix

14 years agoWire up __NR_perf_counter_open syscall for almost all arches as of
Nix [Mon, 8 Feb 2010 18:16:00 +0000 (13:16 -0500)]
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).

14 years agoUnconditionally fall back to software if opening hardware counters fails
Søren Sandmann Pedersen [Mon, 1 Feb 2010 19:02:41 +0000 (14:02 -0500)]
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.

14 years agoRemove deprecated Glib symbols
Javier Jardón [Mon, 2 Nov 2009 22:18:05 +0000 (23:18 +0100)]
Remove deprecated Glib symbols

14 years agoUse GTK+ single includes
Javier Jardón [Mon, 2 Nov 2009 22:13:04 +0000 (23:13 +0100)]
Use GTK+ single includes

14 years agoSupport silent build rules with automake 1.11
Javier Jardón [Mon, 2 Nov 2009 22:23:40 +0000 (23:23 +0100)]
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.

14 years agoPost release version bump
Søren Sandmann Pedersen [Mon, 2 Nov 2009 19:16:26 +0000 (14:16 -0500)]
Post release version bump

14 years agoRelease 1.1.4 1.1.4
Søren Sandmann Pedersen [Mon, 2 Nov 2009 19:15:23 +0000 (14:15 -0500)]
Release 1.1.4

14 years agoMore error handling.
Søren Sandmann Pedersen [Mon, 2 Nov 2009 18:52:11 +0000 (13:52 -0500)]
More error handling.

14 years agoReturn error when the counter can't be opened.
Søren Sandmann Pedersen [Mon, 2 Nov 2009 18:30:04 +0000 (13:30 -0500)]
Return error when the counter can't be opened.

14 years agoAlso filter out NMI stack
Søren Sandmann Pedersen [Thu, 29 Oct 2009 11:40:51 +0000 (07:40 -0400)]
Also filter out NMI stack

14 years agoSkip symbols from IRQ stack.
Søren Sandmann Pedersen [Thu, 29 Oct 2009 11:31:31 +0000 (07:31 -0400)]
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.

14 years agoExclude idle events and set sample_period to 200000
Søren Sandmann Pedersen [Fri, 23 Oct 2009 17:42:11 +0000 (13:42 -0400)]
Exclude idle events and set sample_period to 200000

14 years agoSet wakeup_events to 149, not 150
Søren Sandmann Pedersen [Wed, 21 Oct 2009 16:31:43 +0000 (12:31 -0400)]
Set wakeup_events to 149, not 150

14 years agoTODO
Søren Sandmann Pedersen [Wed, 21 Oct 2009 16:30:32 +0000 (12:30 -0400)]
TODO

14 years agoShow the "-- kernel --" marker in kernel threads
Søren Sandmann Pedersen [Wed, 21 Oct 2009 16:28:43 +0000 (12:28 -0400)]
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.

14 years agoDisable accessibility
Søren Sandmann Pedersen [Wed, 21 Oct 2009 16:27:19 +0000 (12:27 -0400)]
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.

14 years agoMake the events more compact by packing type and pid into one uint32_t.
Søren Sandmann Pedersen [Wed, 21 Oct 2009 12:57:08 +0000 (08:57 -0400)]
Make the events more compact by packing type and pid into one uint32_t.

14 years agoAdd support for software fallback counters
Søren Sandmann Pedersen [Wed, 21 Oct 2009 10:58:20 +0000 (06:58 -0400)]
Add support for software fallback counters

14 years agoTODO
Søren Sandmann Pedersen [Wed, 21 Oct 2009 10:52:18 +0000 (06:52 -0400)]
TODO

14 years agoRemove final bits of binparser
Søren Sandmann Pedersen [Thu, 8 Oct 2009 23:25:54 +0000 (19:25 -0400)]
Remove final bits of binparser

14 years agoEliminate more BinParser stuff
Søren Sandmann Pedersen [Thu, 8 Oct 2009 23:17:24 +0000 (19:17 -0400)]
Eliminate more BinParser stuff

14 years agoBeginning of the end for BinParser.
Søren Sandmann Pedersen [Thu, 8 Oct 2009 21:40:20 +0000 (17:40 -0400)]
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.

14 years agoPre-release version bump 1.1.2
Søren Sandmann Pedersen [Sat, 26 Sep 2009 13:56:33 +0000 (09:56 -0400)]
Pre-release version bump

14 years agoRemove GSEAL macros
Søren Sandmann Pedersen [Fri, 25 Sep 2009 16:47:55 +0000 (12:47 -0400)]
Remove GSEAL macros

14 years agoReally make it compile on older kernels
Søren Sandmann Pedersen [Fri, 25 Sep 2009 15:50:08 +0000 (11:50 -0400)]
Really make it compile on older kernels

14 years agoMake it distcheck
Søren Sandmann Pedersen [Fri, 25 Sep 2009 15:37:26 +0000 (11:37 -0400)]
Make it distcheck

Also add a warning about compiling against a too old kernel.

14 years agoComment out some debugging spam; update copyright
Søren Sandmann Pedersen [Fri, 25 Sep 2009 15:24:40 +0000 (11:24 -0400)]
Comment out some debugging spam; update copyright

14 years agoEliminate 'partial' string
Søren Sandmann Pedersen [Thu, 24 Sep 2009 14:46:59 +0000 (10:46 -0400)]
Eliminate 'partial' string

14 years agoIn sysprof-cli.c, stop the collector before trying to create a profile
M Joonas Pihlaja [Wed, 16 Sep 2009 12:21:49 +0000 (08:21 -0400)]
In sysprof-cli.c, stop the collector before trying to create a profile

14 years agoUpdate TODO
Søren Sandmann Pedersen [Mon, 14 Sep 2009 08:59:28 +0000 (04:59 -0400)]
Update TODO

14 years agoRead data before stopping collector.
Søren Sandmann Pedersen [Thu, 10 Sep 2009 07:41:32 +0000 (03:41 -0400)]
Read data before stopping collector.

Stop debug spew.

14 years agoTODO
Søren Sandmann Pedersen [Thu, 10 Sep 2009 07:08:16 +0000 (03:08 -0400)]
TODO

14 years agoTODO, plus a number of other fixes
Søren Sandmann Pedersen [Tue, 8 Sep 2009 23:35:03 +0000 (19:35 -0400)]
TODO, plus a number of other fixes

14 years agoAvoid mallocs in process_sample()
Søren Sandmann Pedersen [Tue, 8 Sep 2009 07:24:46 +0000 (03:24 -0400)]
Avoid mallocs in process_sample()

14 years agoBetter handling of events without stacktraces
Søren Sandmann Pedersen [Tue, 8 Sep 2009 06:59:04 +0000 (02:59 -0400)]
Better handling of events without stacktraces

14 years agoRemove stash from collector
Søren Sandmann Pedersen [Tue, 8 Sep 2009 06:30:16 +0000 (02:30 -0400)]
Remove stash from collector

14 years agoInitial support for fork/exit events
Søren Sandmann Pedersen [Tue, 8 Sep 2009 06:26:04 +0000 (02:26 -0400)]
Initial support for fork/exit events

14 years agoMake sure parser->symbols is non-NULL after read_table()
Søren Sandmann Pedersen [Tue, 8 Sep 2009 05:26:29 +0000 (01:26 -0400)]
Make sure parser->symbols is non-NULL after read_table()

Otherwise, we would read the file over and over.

Also get the process name from /proc/pid/cmdline, falling back to
/proc/pid/status if there is nothing there.

14 years agoTODO
Søren Sandmann Pedersen [Tue, 8 Sep 2009 04:45:43 +0000 (00:45 -0400)]
TODO

14 years agoDestroy state object after use, don't keep bin files in map objects
Søren Sandmann Pedersen [Tue, 8 Sep 2009 04:15:19 +0000 (00:15 -0400)]
Destroy state object after use, don't keep bin files in map objects

14 years agoMove bin file cache to state object
Søren Sandmann Pedersen [Tue, 8 Sep 2009 04:06:12 +0000 (00:06 -0400)]
Move bin file cache to state object

14 years agoSimplify vdso reading in binfile.c
Søren Sandmann Pedersen [Tue, 8 Sep 2009 04:00:06 +0000 (00:00 -0400)]
Simplify vdso reading in binfile.c

14 years agoRemove last bits of process.[ch]
Søren Sandmann Pedersen [Tue, 8 Sep 2009 03:35:30 +0000 (23:35 -0400)]
Remove last bits of process.[ch]

14 years agoDon't compile process.[ch] anymore
Søren Sandmann Pedersen [Tue, 8 Sep 2009 03:33:48 +0000 (23:33 -0400)]
Don't compile process.[ch] anymore

14 years agoUpdate TODO
Søren Sandmann Pedersen [Tue, 8 Sep 2009 02:50:30 +0000 (22:50 -0400)]
Update TODO

14 years agoSimpler message formatting
Søren Sandmann Pedersen [Tue, 8 Sep 2009 02:20:13 +0000 (22:20 -0400)]
Simpler message formatting

14 years agoMore informative errors when symbols can't be found
Søren Sandmann Pedersen [Tue, 8 Sep 2009 01:57:20 +0000 (21:57 -0400)]
More informative errors when symbols can't be found

14 years agoVarious debug spew
Søren Sandmann Pedersen [Tue, 8 Sep 2009 01:22:48 +0000 (21:22 -0400)]
Various debug spew

14 years agoAdd symbol resolution to tracker
Søren Sandmann Pedersen [Tue, 8 Sep 2009 00:43:22 +0000 (20:43 -0400)]
Add symbol resolution to tracker

14 years agoAdd process and map tracking to tracker
Søren Sandmann Pedersen [Mon, 7 Sep 2009 23:16:52 +0000 (19:16 -0400)]
Add process and map tracking to tracker

14 years agoAdd events to tracker instead of stash
Søren Sandmann Pedersen [Mon, 7 Sep 2009 22:43:34 +0000 (18:43 -0400)]
Add events to tracker instead of stash

14 years agoFake new_process and new_map events when a tracker is created
Søren Sandmann Pedersen [Mon, 7 Sep 2009 22:18:26 +0000 (18:18 -0400)]
Fake new_process and new_map events when a tracker is created

14 years agoHook up dead period, and only call back after a complete batch of samples
Søren Sandmann Pedersen [Mon, 7 Sep 2009 20:27:50 +0000 (16:27 -0400)]
Hook up dead period, and only call back after a complete batch of samples

14 years agoImplement tracker_add_sample()
Søren Sandmann Pedersen [Mon, 7 Sep 2009 19:57:34 +0000 (15:57 -0400)]
Implement tracker_add_sample()

14 years agoMake stack_stash_add_trace() return a pointer to the trace
Søren Sandmann Pedersen [Mon, 7 Sep 2009 19:55:45 +0000 (15:55 -0400)]
Make stack_stash_add_trace() return a pointer to the trace

14 years agoMake StackStash store uint64_ts instead of pointers
Søren Sandmann Pedersen [Mon, 7 Sep 2009 19:13:14 +0000 (15:13 -0400)]
Make StackStash store uint64_ts instead of pointers