Commit Graph

42 Commits

Author SHA1 Message Date
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
402ffc9e4a update
Sat May 21 20:58:59 2005  Soeren Sandmann  <sandmann@redhat.com>

        * TODO: update

        * sysprof.c (on_menu_item_activated): New function.

        * sysprof.c (build_gui): Hook up menu items.

        * module/sysprof-module.c (init_module): Remove module_init/exit
        as they cause build failure on kernels < 2.6.11.
2005-05-22 01:01:20 +00:00
d9de1e5a36 Remove ref-counting since it didn't actually do any good.
Wed May 18 22:21:52 2005  Søren Sandmann  <sandmann@redhat.com>

        * module/sysprof-module.c: Remove ref-counting since it didn't
        actually do any good.

        * sysprof.c (load_module): Use g_spawn_command_line_sync() instaed
        of system().
2005-05-19 02:27:18 +00:00
720e07109c First attempt at making module robust agains unloading when in use.
Sun May 15 11:56:30 2005  Søren Sandmann  <sandmann@redhat.com>

	* module/sysprof-module.c: First attempt at making module robust
	agains unloading when in use.
2005-05-15 15:57:33 +00:00
023c75d71a Do more-or-less what the automake manual suggests about foreign
Sun May 15 10:24:09 2005  Soeren Sandmann  <sandmann@redhat.com>

	* Makefile.am, module/Makefile: Do more-or-less what the automake
	manual suggests about foreign subdirectories.
2005-05-15 14:25:02 +00:00
71db050480 Auto*ify.
Sat May 14 15:49:52 2005  Søren Sandmann  <sandmann@redhat.com>

	Auto*ify.

	* TODO: updates

	* AUTHORS, INSTALL, Makefile.am, NEWS, configure.ac: New files

	* module/Makefile: New file

	* module/sysprof-module.c, module/sysprof-module.h: Move these
	files to their own directy, as the kernel build system does not
	work very well with auto*.

	* sysprof.c, autogen.sh: Some auto* changes.
2005-05-14 19:53:53 +00:00