Commit Graph

55 Commits

Author SHA1 Message Date
b060e05909 Update to work with new vm_operations interface from 2.6.23. Patch from
Sun Sep 14 16:04:17 2008  Søren Sandmann  <sandmann@redhat.com>

	* sysprof/module/sysprof-module.c: Update to work with new
	vm_operations interface from 2.6.23. Patch from Chris Wilson.



svn path=/trunk/; revision=435
2008-09-14 20:07:08 +00:00
3911e057d7 Reorder the tests for CONFIG_X86 and CONFIG_X86_64 since post 2.6.26, they
2008-04-30  Owen Taylor  <otaylor@redhat.com>

	* module/sysprof-module.c: Reorder the tests for 
	CONFIG_X86 and CONFIG_X86_64 since post 2.6.26, they are
	both defined on x86-64 machines.

svn path=/trunk/; revision=419
2008-05-08 13:27:06 +00:00
d2a6151f8d Beginning of a dwarf unwinder.
Sat Mar 29 11:14:38 2008  Søren Sandmann  <sandmann@redhat.com>

        * unwind.[ch], testunwind.c: Beginning of a dwarf unwinder.



svn path=/trunk/; revision=405
2008-03-29 16:00:33 +00:00
72ef8ca8c6 x86 merge happened in 2.6.25
Sat Mar 29 08:05:46 2008  Søren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c: x86 merge happened in 2.6.25



svn path=/trunk/; revision=404
2008-03-29 12:14:13 +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
83fd2bbc31 Support for 2.6.24 and newer
2008-03-20  Soren Sandmann <sandmann@redhat.com>

       * module/sysprof-module.c: Support for 2.6.24 and newer



svn path=/trunk/; revision=400
2008-03-20 07:19:13 +00:00
9d2f7a1a9d Add a memcpy() that uses nontemporal writes. (copy_kernel_stack): Add
2008-02-16  Soren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c (nt_memcpy): Add a memcpy() that uses
	nontemporal writes.
	(copy_kernel_stack): Add commented-out use of it here.



svn path=/trunk/; revision=396
2008-02-16 15:54:40 +00:00
d3b5cc446f Update TODO
svn path=/trunk/; revision=394
2007-11-19 17:56:02 +00:00
8d73f2d391 Make heuristic stack scanning more accurate
2007-11-18  Soren Sandmann <sandmann@daimi.au.dk>

        * module/sysprof-module.c (heuristic_trace): Make heuristic stack
        scanning more accurate



svn path=/trunk/; revision=393
2007-11-19 03:34:19 +00:00
05c4a202b3 Crude heuristic stack scanning on x86-64.
Sun Nov 18 18:12:09 2007  Søren Sandmann  <sandmann@redhat.com>

       * module/sysprof-module.c (heuristic_trace): Crude heuristic stack
       scanning on x86-64.

       * module/sysprof-module.c (copy_kernel_stack): New function



svn path=/trunk/; revision=392
2007-11-18 23:11:52 +00:00
a68837a3ad Return ssize_t instead of int.
Sun Nov 18 13:23:39 2007  Søren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c (sysprof_read): Return ssize_t instead
        of int.

        * module/sysprof-module.c (heuristic_trace): Beginning of
        heuristic user stack scanning.



svn path=/trunk/; revision=391
2007-11-18 18:29:34 +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
6af2993c72 Remove CFLAGS reminiscence of 2.4 support.
2007-10-21  Soren Sandmann <sandmann@daimi.au.dk>

        * module/Makefile: Remove CFLAGS reminiscence of 2.4 support.


svn path=/trunk/; revision=375
2007-10-21 21:35:39 +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
53fa2757b5 Correct $PWD usage, so make install works from inside module/.
2007-01-05  Behdad Esfahbod  <behdad@gnome.org>

        * module/Makefile: Correct $PWD usage, so make install works from
        inside module/.


svn path=/trunk/; revision=346
2007-01-05 21:39:25 +00:00
bd1f064ad3 Add forgotten put_cpu_var(). Parse in chunks of 65536 to improve locality.
2006-12-09  Soren Sandmann <sandmann@daimi.au.dk>

        * module/sysprof-module.c: Add forgotten put_cpu_var().
        * sfile.c (build_instructions): Parse in chunks of 65536 to
        improve locality.
2006-12-09 06:29:43 +00:00
9a1ed3d336 Increase the max number of addresses to 1021, reorganise SysprofMmapArea
2006-10-26  Soren Sandmann <sandmann@daimi.au.dk>

        * module/sysprof-module.h (struct SysprofStackTrace): Increase the
        max number of addresses to 1021, reorganise SysprofMmapArea to
        make the traces naturally page aligned.

        * TODO: Update
2006-11-02 06:54:12 +00:00
e255c00a6d Use PAGE_SIZE - 1 instead of 4096.
2006-10-23  Soren Sandmann <sandmann@daimi.au.dk>

	* module/sysprof-module.c (init_module): Use PAGE_SIZE - 1 instead
	of 4096.
2006-10-23 13:02:40 +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
52274fadd6 Deal with address offsets. Address lookup is now:
2006-10-07  Soren Sandmann  <sandmann@daimi.au.dk>

	Deal with address offsets. Address lookup is now:

	- First convert the address to an offset into the file
	- Then convert to an offset into the text segment
	- Then add the load address of the text segment (found in the
	debug binary)
	- Then finally lookup the result in the symbol table.

	* elfparser.c (elf_parser_get_text_offset): New function

	* elfparser.c (elf_parser_lookup_symbol): Treat addresses as
	offsets into the text segment.

	* binfile.c (bin_file_new): Store the offset of the text section
	of the actual binary (not the debug one)

	(bin_file_lookup_symbol): Subtract text_offset before passing
	address to elf parser.

	* module/sysprof-module.c: Remove include of linux/config.h
2006-10-08 04:03:02 +00:00
6a7178f612 Remove old commented out code Add commented out code accessing entire
2006-08-27  Soren Sandmann <sandmann@redhat.com>

        * binparser.c: Remove old commented out code
        * module/sysprof-module.c: Add commented out code accessing entire
        stack.

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 03:09:24 +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
bde3d8a537 Some formatting fixes.
Sat Aug 12 16:40:38 2006  Søren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c: Some formatting fixes.
2006-08-12 20:40:58 +00:00
c2f754dfb6 Make n_samples per-cpu. Add an atomic variable in_timer_notify and use it
Sat Aug 12 16:13:05 2006  Søren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c: Make n_samples per-cpu. Add an atomic
	variable in_timer_notify and use it to lock out simultaneous timer
	interrupts.

	* stackstash.c (decorate_node): Make decorate_node() static

	* TODO
2006-08-12 20:15:52 +00:00
0a592c152a more ifdef's to make it work with Red Hat Enterprise Linux 4's 2.6.9-based
2006-02-17  Bastien Nocera  <hadess@hadess.net>

	* configure.ac:
	* module/sysprof-module.c: (timer_notify), (sysprof_open),
	(sysprof_release): more ifdef's to make it work with Red Hat
	Enterprise Linux 4's 2.6.9-based kernel
2006-02-17 15:44:55 +00:00
68827a7fbc Print out sysprof version at module load time.
Sun Jan 15 20:22:20 2006  Soeren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c (init_module): Print out sysprof version
	at module load time.
2006-01-16 01:22:27 +00:00
2d525523f8 Initialize retval.
Fri Jan 13 22:59:48 2006  Soeren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c (sysprof_open): Initialize retval.

	* module/sysprof-module.c (sysprof_read): Copy contents of trace,
	not tail to the buffer.
2006-01-14 04:00:59 +00:00
6d76b0c486 Remove START_OF_STACK check.
Mon Jan  9 09:58:25 2006  Soeren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c (timer_notify): Remove START_OF_STACK
	check.
2006-01-09 14:58:42 +00:00
f6d7a34ccf small updates cosmetic updates cosmetic updates
Thu Jan  5 17:52:10 2006  Søren Sandmann  <sandmann@redhat.com>

	* TODO: small updates
	* sysprof.c: cosmetic updates
	* module/sysprof-module.c: cosmetic updates
2006-01-05 22:52:59 +00:00
3c8bde00b4 Remove left over debug print out and add support for multiple clients
2005-12-20  Kristian Høgsberg  <krh@redhat.com>

        * module/sysprof-module.c: Remove left over debug print out and
        add support for multiple clients (readers).
2005-12-20 22:45:34 +00:00
acc0ee9ec9 Remove left over debug print out.
2005-12-20  Kristian Høgsberg  <krh@redhat.com>

        * module/sysprof-module.c (sysprof_read): Remove left over debug
        print out.
2005-12-20 21:30:07 +00:00
ad5ffd749b Dist and install udev rule.
2005-12-20  Kristian Høgsberg  <krh@redhat.com>

        * Makefile.am: Dist and install udev rule.

        * collector.c: (open_fd):
        * sysprof-text.c: (no_module):
        * sysprof.c: (on_start_toggled): Update device filename.

        * 60-sysprof.rules: New udev rule file to set permissions for
        sysprof char device.

        * module/sysprof-module.c: Switch kernel module to use a misc char
        device instead.  Start and stop the timer on device open and
        close instead of module load and unload.
2005-12-20 17:55:03 +00:00
1fe1419ef3 *** empty log message *** 2005-12-19 20:29:57 +00:00
a829366b72 A few formatting fixes. Hopefully make it work with x86-64.
Mon Dec 19 15:15:48 2005  Søren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c (timer_notify): A few formatting
	fixes. Hopefully make it work with x86-64.
2005-12-19 20:24:18 +00:00
22d15cd2cc Various cleanups
Wed Nov 23 00:44:34 2005  Soeren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c: Various cleanups

        * TODO: updates
2005-11-23 05:33:12 +00:00
ecfcee7ab1 Remove unused pages_present() function
Tue Nov 22 23:38:09 2005  Soeren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c: Remove unused pages_present() function
2005-11-23 04:26:36 +00:00
3a306d20d0 great-sage-equal-to-heaven:~/vertigo/sysprof% head -13 ChangeLog
Sat Nov 12 19:44:43 2005  Søren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c (read_frame): New function that uses
        copy_from_user_inatomic() as check_user_pages_readable() has
        disappeared in recent kernels.

        * module/sysprof-module.c (timer_notify): Use it here.

        * TODO: Updates

        * configure.ac: Change the wording of the CVS HEAD warning as this
        change seems to also have fixed the lockup with rawhide kernels.
2005-11-13 00:46:08 +00:00
cf761a2a70 Add copyright statement.
2005-11-04  Soren Sandmann  <sandmann@redhat.com>

        * collector.[ch]: Add copyright statement.

        * collector.c (on_read): Handle time getting set backwards.

        * collector.c: Remove unused empty_filedescriptor() function.
2005-11-05 04:58:16 +00:00
a49ae59709 Add back these constants, but this time make sure we won't divide by 0 or
Tue Oct 11 22:40:24 2005  Soeren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c (SAMPLES_PER_SECOND): Add back these
        constants, but this time make sure we won't divide by 0 or
        anything like that.
2005-10-12 02:40:29 +00:00
e5987543b0 Delete lots of commented-out code.
Mon Oct 10 22:49:03 2005  Soeren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c: Delete lots of commented-out code.
2005-10-11 02:48:46 +00:00
58073ffba8 Don't use INTERVAL or SAMPLES_PER_SECOND now that we use
Mon Oct 10 13:00:20 2005  Robert Love  <rml@novell.com>

        * module/sysprof-module.c: Don't use INTERVAL or SAMPLES_PER_SECOND
          now that we use register_timer_hook(), which hits off the timer
          interrupt at HZ freqency (1/250 second on x86).
2005-10-10 17:01:57 +00:00
bce3b1fea6 If the address is 0x01, treat as kernel, regardless of whether we have a
Tue Sep 27 01:33:33 2005  Soeren Sandmann  <sandmann@redhat.com>

	* process.c (process_lookup_symbol): If the address is 0x01, treat
	as kernel, regardless of whether we have a map for that address or
	not.

	* module/sysprof-module.c (timer_notify): Take a stack trace of
	the current process, even when we are in kernel mode. This way we
	can assign kernel activity to individual user space stacktraces.

	* TODO: updates.
2005-09-27 05:35:19 +00:00
22d05ac014 Updates
Sun Sep  4 19:38:51 2005  Soeren Sandmann  <sandmann@redhat.com>

	* TODO: Updates
2005-09-04 23:38:40 +00:00
ee53bcffd4 Complain if we can't find /lib/modules/uname -r/build/Makefile.
Tue Aug 30 16:57:33 2005  Søren Sandmann  <sandmann@redhat.com>

	* configure.ac: Complain if we can't find /lib/modules/`uname
	-r`/build/Makefile.

	* process.c (process_lookup_symbol): Take an address of 0x1 to
	mean "in kernel".

	* module/sysprof-module.c (timer_notify): When reporting in-kernel
	time, give the current pid instead of -1.

	* TODO: updates
2005-08-30 20:58:18 +00:00
fbc7b471d2 Add support for amd64/x86-64. Patch from Mike Frysinger.
Mon Aug  1 23:49:51 2005  Soeren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c (REG_INS_PTR): Add support for
        amd64/x86-64. Patch from Mike Frysinger.
2005-08-02 03:52:30 +00:00
f3b78b7944 Cache BinFiles by filename.
Sat Jul  9 23:20:39 2005  Soeren Sandmann  <sandmann@redhat.com>

	* binfile.c (bin_file_new): Cache BinFiles by filename.

	* stackstash.c (stack_stash_free): Plug leak

	* process.c (process_free_maps): Plug leak

	* module/Makefile (install): Check that depmod exists before
	running it.
2005-07-10 03:28:35 +00:00
8e4696a4a1 Add version information
Sun Jun 19 15:39:50 2005  Søren Sandmann  <sandmann@redhat.com>

	* sysprof.c (on_about_activated): Add version information

	* configure.ac: Bump version to 0.91

	* README: Updates
2005-06-19 19:43:02 +00:00
18abd9e1e6 Updates
Sat Jun 18 22:45:04 2005  Søren Sandmann  <sandmann@redhat.com>

	* TODO: Updates

	* configure.ac: Check for Linux 2.6.11

	* process.c (get_pidname): Present pid=-1 as [kernel].

	* module/sysprof-module.c: Use register_timer_hook() instead of
	a kernel timer. Set trace.pid to -1 if interrupt happens in
	kernel.
2005-06-19 02:46:19 +00:00