Commit Graph

304 Commits

Author SHA1 Message Date
bc004a104e include correct header file
svn path=/trunk/; revision=353
2007-02-24 08:35:48 +00:00
494e40a912 Switch to a simpler conceptual model. Update to binparser API changes.
2007-02-24  Soren Sandman <sandmann@daimi.au.dk>

        * binparser.[ch]: Switch to a simpler conceptual model.
        * elfparser.c: Update to binparser API changes.
        * TODO: updates



svn path=/trunk/; revision=352
2007-02-24 07:15:24 +00:00
ea18b8e991 svn path=/trunk/; revision=351
svn path=/trunk/; revision=351
2007-02-09 22:04:45 +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
c1025c6b44 Don't store the size of the symbol. (elf_parser_lookup_symbol): Look it up
Fri Feb  9 16:16:34 2007  Søren Sandmann  <sandmann@redhat.com>

       * elfparser.c (struct ElfSym): Don't store the size of the symbol.
       (elf_parser_lookup_symbol): Look it up here instaed.

       * binfile.c (bin_file_free): Use pre-decrement instead of
       post-decrement.
       (bin_file_check_inode): Clarify the warning a little


svn path=/trunk/; revision=349
2007-02-09 21:30:01 +00:00
e8c2a59906 sysprof-icon-32.png Add a 32x32 version (also from Diana) of the icon.
Mon Jan 22 17:42:29 2007  Søren Sandmann  <sandmann@redhat.com>

	* sysprof-icon-32.png
	* sysprof.c: Add a 32x32 version (also from Diana) of the icon.

Mon Jan 22 16:37:12 2007  Søren Sandmann  <sandmann@redhat.com>

	* sysprof-icon-16/24/48.png:
	* sysprof.c: Add new icons from Diana.



svn path=/trunk/; revision=348
2007-01-22 22:48:33 +00:00
f33e3b06f4 Add new icons
svn path=/trunk/; revision=347
2007-01-22 21:43:36 +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
d333fad261 file announce-1.0.8 was initially added on branch sysprof-1-0. 2006-12-10 02:20:08 +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
4ba672ee9f Set inode for vdso to 0.
2006-11-23  Soren Sandmann <sandmann@daimi.au.dk>

        * process.c (read_maps): Set inode for vdso to 0.

        * binfile.c (read_inode): Return -1 on error, 0 on vdso
        (bin_file_new): Only read the inode if the file actually exists
        and is an elf file.
        (bin_file_check_inode): Return FALSE if there is no file.
2006-11-23 08:03:02 +00:00
973d92eb4d Use GMappedFile instead g_file_get_contents(). (build_instructions): Pass
2006-11-22  Soren Sandmann <sandmann@daimi.au.dk>

        * sfile.c (sfile_load): Use GMappedFile instead
        g_file_get_contents().
        (build_instructions): Pass length instead of -1.
        (sfile_output_save): Use g_file_set_contents() instead of
        cut-and-pasted copy.
2006-11-23 03:32:04 +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
cce917856b Use stack allocated variables to avoid taking addresses of bitfields.
2006-11-19  Soren Sandmann <sandmann@redhat.com>

        * profile.c (profile_load): Use stack allocated variables to avoid
        taking addresses of bitfields.

        * stackstash.h (struct StackNode): Store toplevel as bitfield
2006-11-20 04:11:21 +00:00
0b718ee95c Use stack_node_new() o (profile_load): Use set_root() instead of
2006-11-19  Soren Sandmann <sandmann@redhat.com>

        * profile.c (profile_load): Use stack_node_new() o
        (profile_load): Use set_root() instead of new_from_root();

        * stackstash.c (stack_stash_new_from_root): Delete this function
        (stack_stash_set_root): Add this function
        (stack_node_new): Export this function
2006-11-20 04:08:01 +00:00
9af533a11f Declare bin_parser_free();
2006-11-19   Soren Sandmann <sandmann@redhat.com>

        * binparser.h: Declare bin_parser_free();

        * elfparser.c (elf_parser_get_crc32): Use madvise(DONT_NEED) on
        the file.

        * process.c (struct Process): Remove do_offset.
2006-11-19 22:48:28 +00:00
66fc976342 file announce-1.0.7 was initially added on branch sysprof-1-0. 2006-11-16 14:40:59 +00:00
55fc6d7805 New function
2006-11-02  Soren Sandmann <sandmann@daimi.au.dk>

       * sysprof.c (disable_g_slice): New function

       * sysprof.c (main): Call it from here.
2006-11-11 03:34:40 +00:00
abb66e7dc7 udpate
Thu Nov  9 17:55:24 2006  Søren Sandmann  <sandmann@redhat.com>

        * TODO (-): udpate
2006-11-09 22:55:53 +00:00
3b559da623 Start with "/usr", not "usr". Pointed out by Tim Rowley.
Thu Nov  9 17:31:17 2006  Søren Sandmann  <sandmann@redhat.com>

        * binfile.c (get_debug_file): Start with "/usr", not
        "usr". Pointed out by Tim Rowley.

        * binparser.c (bin_parser_align): Pass byte_width on instead of
        hardcoding 4.
2006-11-09 22:32:22 +00:00
ea0690817c Look in the correct directory for debug info files. (Tim Rowley)
Thu Nov  9 16:47:35 2006  Søren Sandmann  <sandmann@redhat.com>

        Look in the correct directory for debug info files. (Tim Rowley)

        * binfile.c (N_TRIES): Add this instead of hardcoding '3'

        * binfile.c (get_debug_file): Also look in "/usr/lib/debug", in
        addition to "$(libdir)/debug".

        * binfile.c: Comment out the debug spew.
2006-11-09 21:56:28 +00:00
5e91fe1818 Add debug spew.
Thu Nov  9 16:17:11 2006  Søren Sandmann  <sandmann@redhat.com>

        * binfile.c: Add debug spew.
2006-11-09 21:17:59 +00:00
442a9b4f3c Die immediately if the output file is a directory.
Thu Nov  9 16:01:47 2006  Søren Sandmann  <sandmann@redhat.com>

        * sysprof-text.c (main): Die immediately if the output file is a
        directory.

        * autogen.sh (DIE): Also work when automake-1.9 is installed.
2006-11-09 21:02:31 +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
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
e7415d4492 file announce-1.0.5 was initially added on branch sysprof-1-0. 2006-10-30 03:21:45 +00:00
cdcf1e93e4 file announce-1.0.4 was initially added on branch sysprof-1-0. 2006-10-30 01:06:46 +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
d78e744422 Make the pointer array static to improve cache behavior and reduce calls
2006-10-25  Soren Sandmann <sandmann@daimi.au.dk>

        * profile.c (add_trace_to_tree): Make the pointer array static to
        improve cache behavior and reduce calls to malloc().

        * process.c (lookup_kernel_symbol): Remove obsolete comment.
2006-10-26 05:13:16 +00:00
e2150fc188 Incomplete changelog 2006-10-25 04:47:34 +00:00
c6978f660b +2006-10-25 Soren Sandmann <sandmann@daimi.au.dk> + + * process.c
+2006-10-25  Soren Sandmann <sandmann@daimi.au.dk>
+
+       * process.c (free_maps): Take a pointer to a variable that
+
+       * process.c: Stop coalescing processes with the same cmdline.
+
+       * TODO: updates.
+
2006-10-25 04:47:06 +00:00
a715b55029 replace PAGE_SIZE macro with this function.
2006-10-24  Soren Sandmann <sandmann@daimi.au.dk>

	* process.c (page_size): replace PAGE_SIZE macro with this function.

	* binfile.c: Remove obsolete comment.
2006-10-25 02:02:44 +00:00
c02712dc85 Use an array instead of list of maps.
2006-10-24  Soren Sandmann <sandmann@daimi.au.dk>

	* process.c (struct Process): Use an array instead of list of
	maps.
2006-10-24 04:00:59 +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
5eb19d00fa Skip nodes that don't have a parent.
2006-10-11  Soren Sandmann <sandmann@daimi.au.dk>

	* profile.c (profile_list_callers): Skip nodes that don't have a
	parent.
2006-10-12 03:45:21 +00:00
df07f71539 Make this function return a list of immediate callers again.
2006-10-09  Soren Sandmann <sandmann@daimi.au.dk>

	* profile.c (profile_list_callers): Make this function return a
	list of immediate callers again.

	* sysprof.c (build_gui): Change label back to "Callers"

	* process.c (get_kernel_symbols): Only attempt to read the kernel
	symbols once.
2006-10-11 05:37:24 +00:00
6475029375 +2006-10-09 Soren Sandmann <sandmann@redhat.com>
+
+       * binfile.c (bin_file_get_inode): Remove this function
+
+       * binfile.c (bin_file_check_inode): New function. Only print inode
+       warning once per BinFile.
+
+       * process.c (process_get_vdso_bytes): Remove debug spew
+
2006-10-10 00:52:44 +00:00
b54b0809b6 New function.
2006-10-09  Soren Sandmann  <ssp@localhost.localdomain>

	* process.c (process_get_vdso_bytes): New function.

	* elfparser.c (parser_new_from_data): export this function as
	elf_parser_new_from_data().

	* binfile.c (read_inode): Don't stat if filename is
	'[vdso]'. Instead just return -1;
	(bin_file_new): Use elf_parser_new_from_data() when the file is
	[vdso].

	* process.c (read_maps): Change the offset of the vdso map to 0
	and the inode to -1.

	* elfparser.c (elf_parser_lookup_symbol): Remove unused 'size'
	variable.

	* binfile.c (find_separate_debug_file): Deal with cycles in the
	debuglink graph.

	* configure.ac: Set version to 1.1.0. Print warning about HEAD.
2006-10-09 21:32:24 +00:00
4050648b0e Don't include bfd.h
2006-10-08   Soren Sandmann <sandmann@daimi.au.dk>

	* binfile.c: Don't include bfd.h
2006-10-09 02:25:46 +00:00
a6145207ca New function to support --version option
2006-10-08  Soren Sandmann <sandmann@redhat.com>

	* sysprof.c (process_options): New function to support --version option
2006-10-08 22:05:47 +00:00
0cf636d8fe Add a cache of the text section.
2006-10-08  Soren Sandmann  <sandmann@redhat.com>

	* elfparser.c (struct ElfParser): Add a cache of the text section.

	* binparser.c (struct BinParser): Add a cache of a bin record to
	get rid of malloc()/free() overhead.

	* elfparser.c (struct ElfSym): Cache the size of the symbol
2006-10-08 20:14:25 +00:00
86810e63a5 Remove now unused load-address heuristic
2006-10-08  Soren Sandmann <sandmann@redhat.com>

	* elfparser.c: Remove now unused load-address heuristic

	* comment out debug spew
2006-10-08 18:50:10 +00:00
a91a19887a Use "SHT_DYNSYM" for ".dynsym".
2006-10-08  Soren Sandmann <sandmann@redhat.com>

	* elfparser.c (read_symbols): Use "SHT_DYNSYM" for ".dynsym".
2006-10-08 18:09:17 +00:00
c27e5debc5 Support _debuglink recursions.
2006-10-08  Soren Sandmann <sandmann@daimi.au.dk>

	* binfile.c (find_separate_debug_file): Support _debuglink
	recursions.

	* elfparser.c: Check that the sections have valid types before
	using them.
2006-10-08 17:45:09 +00:00
29a4acaa94 Delete debug spew 2006-10-08 04:07:18 +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