Commit Graph

66 Commits

Author SHA1 Message Date
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
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
432cd9ce55 Add support for software fallback counters 2009-10-21 06:58:20 -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
9072f891fd Eliminate 'partial' string 2009-09-24 10:46:59 -04:00
08fc4f64a9 Read data before stopping collector.
Stop debug spew.
2009-09-11 04:07:11 -04:00
09ffea0d57 TODO, plus a number of other fixes 2009-09-08 19:35:03 -04:00
6dabcefec5 Better handling of events without stacktraces 2009-09-08 03:03:38 -04:00
23147e1141 Remove stash from collector 2009-09-08 03:03:26 -04:00
e277712037 Initial support for fork/exit events 2009-09-08 03:03:24 -04:00
3d9cbe20e7 Remove last bits of process.[ch] 2009-09-08 03:03:15 -04:00
b8364e2847 Don't compile process.[ch] anymore 2009-09-08 03:03:14 -04:00
43e419f774 Simpler message formatting 2009-09-08 03:03:11 -04:00
29e270cb8d Various debug spew 2009-09-08 03:03:08 -04:00
d34a1cf460 Add symbol resolution to tracker 2009-09-08 03:03:07 -04:00
cdc7ce7e12 Add process and map tracking to tracker 2009-09-08 03:03:06 -04:00
5072c23f42 Add events to tracker instead of stash 2009-09-08 03:03:04 -04:00
b86b04910f Fake new_process and new_map events when a tracker is created 2009-09-08 03:03:03 -04:00
139acd0287 Hook up dead period, and only call back after a complete batch of samples 2009-09-08 03:03:01 -04:00
e387de1c3a Make StackStash store uint64_ts instead of pointers 2009-09-08 03:02:56 -04:00
47795ba85b Use a buffer of 32 pages.
Also remove a debug print statement.
2009-09-08 03:02:49 -04:00
08ba6bfbd3 Use two consecutive mappings of the ring buffer.
This allows us to not ignore wrapping and just process events instead
of having to copy the data to temporary storage.
2009-09-08 03:02:37 -04:00
594a58d674 Initial port to perf counters 2009-09-08 03:02:11 -04:00
62ffe734b0 Call back after collecting all traces.
2008-03-24  Soren Sandmann <sandmann@daimi.au.dk>

        * collector.c (collect_traces): Call back after collecting all
        traces. 

        * TODO: update

        * process.c: Simpler code to find vmlinux 



svn path=/trunk/; revision=406
2008-03-29 19:08:01 +00:00
c2de993836 Use kernel builtin tracer instead of copying everything ourselves.
2008-03-20  Soren Sandmann <sandmann@redhat.com>
 
       * module/sysprof-module.c (trace_kernel): Use kernel builtin
       tracer instead of copying everything ourselves.


svn path=/trunk/; revision=401
2008-03-20 09:49:46 +00:00
542967b1f7 Update a comment
svn path=/trunk/; revision=399
2008-03-02 00:08:21 +00:00
b98db05f9b Add commented out code to reject callback.
2008-02-17  Soren Sandmann  <sandmann@redhat.com>

	* collector.c (lookup_symbol): Add commented out code to reject
	callback.

	* elfparser.c (struct ElfParser): Store the filename if any
	(elf_parser_get_sym_address): Subtract the load address, so the
	result will be an offset into the text section.

	* process.[ch] (process_lookup_symbol): Add an offset out-argument
	
	* binfile.[ch] (bin_symbol_get_address): New function

	* TODO: updates



svn path=/trunk/; revision=397
2008-02-17 23:31:19 +00:00
d3b5cc446f Update TODO
svn path=/trunk/; revision=394
2007-11-19 17:56:02 +00:00
f7a138fa15 +2007-11-17 Soren Sandmann <sandmann@daimi.au.dk>
+
+       * collector.c (collector_create_profile): Don't collect traces here.
+


svn path=/trunk/; revision=390
2007-11-17 06:23:39 +00:00
41efdc9c7e Formatting
2007-11-16  Soren Sandmann <sandmann@daimi.au.dk>

	* module/sysprof-module.c (n_traces_available): Formatting
	
	* module/sysprof-module.c (sysprof_poll): Require 16 traces rather
	than 8. 
	

svn path=/trunk/; revision=389
2007-11-17 03:48:31 +00:00
c00ccd69c7 updates
2007-11-16  Soren Sandmann <sandmann@daimi.au.dk>

	* TODO: updates
	
	* module/sysprof-module.c (sysprof_poll): Only select readable
	when there is at least eight traces available

	* collector.c (collect_traces): New function, old on_read()
	
	* collector.c (collector_create_profile): Collect traces here as
	well.


svn path=/trunk/; revision=388
2007-11-17 02:53:22 +00:00
1867b97a8d Use an array instead of a list. Look for vmlinux in the source directory.
2007-10-22  Soren Sandmann <sandmann@daimi.au.dk>

        * process.c (look_for_vmlinux): Use an array instead of a
        list. Look for vmlinux in the source directory.

        * elfparser.c (elf_parser_get_crc32): Only use MADV_DONTNEED if
        the data is file-backed.

        * TODO: updates.

        Various formatting fixes


svn path=/trunk/; revision=385
2007-10-25 02:45:54 +00:00
476e6f0c1b Call callback with an extra boolean indicating whether the sample read was
2007-10-20  Soren Sandmann <sandmann@daimi.au.dk>

       * collector.c (on_read): Call callback with an extra boolean
       indicating whether the sample read was the first one

       * collector.c (add_trace_to_stash): Allocate addresses on the
       stack if possible.

       * sysprof.c (on_new_sample): Only call update_sensitivity() on the
       first sample.

       * stackstash.c (stack_stash_add_trace): Move match to front


svn path=/trunk/; revision=373
2007-10-20 23:51:35 +00:00
f1cbdbf27c Add support for looking up kernel symbols from /proc/kallsyms
2007-09-16  Soren Sandmann <sandmann@daimi.au.dk>

	* process.c (process_lookup_kernel_symbol): Add support for
	looking up kernel symbols from /proc/kallsyms

	* sysprof-text.c (dump_data): Print note that the file is being
	saved.

	* module/sysprof-module.[ch] (timer_notify): Send a copy of the
	kernel stack to userspace.

	* collector.c: Do kernel symbol lookups.
	

svn path=/trunk/; revision=372
2007-09-17 01:43:07 +00:00
39cb26654a Compute the size by simply summing the size of the siblings. They are
2007-08-26  Soren Sandmann <sandmann@daimi.au.dk>

        * profile.c (profile_get_size): Compute the size by simply summing
        the size of the siblings. They are toplevel by definition, and
        this works if the siblings for some reason has the same address.


svn path=/trunk/; revision=371
2007-08-26 05:41:59 +00:00
39577811d3 TODO updates
svn path=/trunk/; revision=368
2007-08-26 03:55:15 +00:00
bbed8de81e Remove FIXME.
2007-03-02  Soren Sandmann <sandmann@daimi.au.dk>

        * collector.c (collector_create_profile): Remove FIXME.



svn path=/trunk/; revision=359
2007-03-02 06:30:42 +00:00
c541052c19 Update copyright notices
Fri Feb  9 16:53:29 2007  Søren Sandmann  <sandmann@redhat.com>

	* Update copyright notices



svn path=/trunk/; revision=350
2007-02-09 21:59:15 +00:00
d3c0e7be5c Move match to front (add_trace_to_tree): Break as soon as a recursive call
2006-11-22  Soren Sandmann <sandmann@daimi.au.dk>

        * profile.c (add_trace_to_tree): Move match to front
        (add_trace_to_tree): Break as soon as a recursive call is found.

        * stackstash.c (do_callback): Manual tail call optimization.
2006-11-22 07:06:04 +00:00
d1a082ffec reset the collector after generating the profile.
2006-11-20  Soren Sandmann <sandmann@daimi.au.dk>

        * sysprof.c (ensure_profile): reset the collector after generating
        the profile.

        * stackstash.c (struct StackStash): Add cached_nodes and blocks.
        (stack_node_new): Allocate stack nodes in blocks.
2006-11-20 07:25:02 +00:00
0513ed87e8 Valgrind:
2006-11-02  Soren Sandmann <sandmann@daimi.au.dk>

        Valgrind:

        * binparser.c (bin_parser_free): Add this function

        * elfparser.c (elf_parser_free): Call bin_parser_free()

        * sysprof.c (compute_text_width, add_text): Plug leaks

        * collector.c (add_trace_to_stash): Copy n_addresses to a stack
        variable instead of reading it out of the mmap'ed area all the
        time. (That way if there is an overrun, we won't write too much
        into the address array).
2006-11-02 08:33:35 +00:00
4c38d78e3c Combine processes with identical commandlines here.
2006-10-26  Soren Sandmann <sandmann@daimi.au.dk>

        * collector.c (resolve_symbols): Combine processes with identical
        commandlines here.
2006-10-26 05:49:01 +00:00
4dd37d092c Communicate traces to userspace through shared memory instead of copying.
2006-10-22  Soren Sandmann <sandmann@daimi.au.dk>

	Communicate traces to userspace through shared memory instead of
	copying.

	* module/sysprof-module.c: Store the traces in a SysprofMmapArea.
	(sysprof_mmap): Implement this method.
	(sysprof_nopage): Implement this.
	(sysprof_read): Just reset the tail pointer and return zero.

	* module/sysprof-module.h (struct SysprofMmapArea): New
	structure.

	* collector.c (collector_stop): Unmap the device
	(in_dead_period): New function
	(on_read): Read the traces out of mmap()ed area instead of reading
	them. Call read() to prevent poll() from firing.
	(struct Collector): New members map_area and current.

	* Makefile.am (insert-module): Prefix modprobe with /sbin

	* collector.c (open_fd): mmap() the sysprof device.
2006-10-23 03:46:25 +00:00
8f4d731788 Revert accidental commit 2006-09-23 00:57:20 +00:00
b7cf5d34b8 Remove old commented out code
2006-08-27  Soren Sandmann <sandmann@redhat.com>

	* binparser.c: Remove old commented out code

2006-08-27  Soren Sandmann  <sandmann@redhat.com>

	* module/Makefile ($(MODULE).o): Add dependency on sysprof-module.h

	* elfparser.c (elf_parser_get_eh_frame): Add this function.
	Remove some commented out code.
2006-09-23 00:54:01 +00:00
62c86a1951 Demangle instead of strdup.
2006-08-22  Soren Sandmann <sandmann@daimi.au.dk>

	* collector.c (unique_dup): Demangle instead of strdup.
2006-08-26 16:27:00 +00:00