platform/upstream/sysprof.git
17 years agoNew function. Only warn once about bad CRC's.
Søren Sandmann [Mon, 5 Mar 2007 21:53:57 +0000 (21:53 +0000)]
New function. Only warn once about bad CRC's.

Mon Mar  5 16:55:39 2007  Søren Sandmann  <sandmann@redhat.com>

        * binfile.c (already_warned): New function. Only warn once about
        bad CRC's.

svn path=/trunk/; revision=361

17 years agoMake this function static
Soren Sandmann [Fri, 2 Mar 2007 06:36:34 +0000 (06:36 +0000)]
Make this function static

 2007-03-02  Soren Sandmann <sandmann@daimi.au.dk>

       * sysprof-text.c (dump_data): Make this function static

svn path=/trunk/; revision=360

17 years agoRemove FIXME.
Soren Sandmann [Fri, 2 Mar 2007 06:30:42 +0000 (06:30 +0000)]
Remove FIXME.

2007-03-02  Soren Sandmann <sandmann@daimi.au.dk>

        * collector.c (collector_create_profile): Remove FIXME.

svn path=/trunk/; revision=359

17 years agoFree the undefined symbol
Soren Sandman [Fri, 2 Mar 2007 06:27:05 +0000 (06:27 +0000)]
Free the undefined symbol

2007-03-02  Soren Sandman <sandmann@daimi.au.dk>

* process.c (free_process): Free the undefined symbol

svn path=/trunk/; revision=358

17 years agoMake a copy of the vdso bytes to make valgrind a little quieter.
Soren Sandmann [Fri, 2 Mar 2007 06:21:37 +0000 (06:21 +0000)]
Make a copy of the vdso bytes to make valgrind a little quieter.

2007-03-02  Soren Sandmann <sandmann@daimi.au.dk>

* process.c (process_get_vdso_bytes): Make a copy of the vdso
bytes to make valgrind a little quieter.

* binparser.c: Note to self: Save the file, *then* commit.

svn path=/trunk/; revision=357

17 years agoFix two leaks, both pointed out by Kjartan Maraas
Soren Sandmann [Fri, 2 Mar 2007 05:23:30 +0000 (05:23 +0000)]
Fix two leaks, both pointed out by Kjartan Maraas

2007-03-02  Soren Sandmann <sandmann@daimi.au.dk>

        Fix two leaks, both pointed out by Kjartan Maraas

        * binparser.c (bin_parser_free): Free the record list

        * elfparser.c (elf_parser_free): Free the symbol table.

svn path=/trunk/; revision=356

17 years agosvn path=/trunk/; revision=355
Søren Sandmann Pedersen [Sun, 25 Feb 2007 04:15:51 +0000 (04:15 +0000)]
svn path=/trunk/; revision=355

svn path=/trunk/; revision=355

17 years agoUpdates
Soren Sandmann [Sat, 24 Feb 2007 08:49:51 +0000 (08:49 +0000)]
Updates

2007-02-24  Soren Sandmann <sandmann@daimi.au.dk>

        * TODO: Updates

        * binparser.[ch]: Get rid of BIN_UINTn types; replace with single
        BIN_UINT, where the user must provide the width

        * elfparser.c: Update to new binparser API

svn path=/trunk/; revision=354

17 years agoinclude correct header file
Søren Sandmann Pedersen [Sat, 24 Feb 2007 08:35:48 +0000 (08:35 +0000)]
include correct header file

svn path=/trunk/; revision=353

17 years agoSwitch to a simpler conceptual model. Update to binparser API changes.
Soren Sandman [Sat, 24 Feb 2007 07:15:24 +0000 (07:15 +0000)]
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

17 years agosvn path=/trunk/; revision=351
Søren Sandmann Pedersen [Fri, 9 Feb 2007 22:04:45 +0000 (22:04 +0000)]
svn path=/trunk/; revision=351

svn path=/trunk/; revision=351

17 years agoUpdate copyright notices
Søren Sandmann [Fri, 9 Feb 2007 21:59:15 +0000 (21:59 +0000)]
Update copyright notices

Fri Feb  9 16:53:29 2007  Søren Sandmann  <sandmann@redhat.com>

* Update copyright notices

svn path=/trunk/; revision=350

17 years agoDon't store the size of the symbol. (elf_parser_lookup_symbol): Look it up
Søren Sandmann [Fri, 9 Feb 2007 21:30:01 +0000 (21:30 +0000)]
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

17 years agosysprof-icon-32.png Add a 32x32 version (also from Diana) of the icon.
Søren Sandmann [Mon, 22 Jan 2007 22:48:33 +0000 (22:48 +0000)]
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

17 years agoAdd new icons
Søren Sandmann Pedersen [Mon, 22 Jan 2007 21:43:36 +0000 (21:43 +0000)]
Add new icons

svn path=/trunk/; revision=347

17 years agoCorrect $PWD usage, so make install works from inside module/.
Behdad Esfahbod [Fri, 5 Jan 2007 21:39:25 +0000 (21:39 +0000)]
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

17 years agofile announce-1.0.8 was initially added on branch sysprof-1-0.
Søren Sandmann Pedersen [Sun, 10 Dec 2006 02:20:08 +0000 (02:20 +0000)]
file announce-1.0.8 was initially added on branch sysprof-1-0.

17 years agoAdd forgotten put_cpu_var(). Parse in chunks of 65536 to improve locality.
Soren Sandmann [Sat, 9 Dec 2006 06:29:43 +0000 (06:29 +0000)]
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.

17 years agoSet inode for vdso to 0.
Soren Sandmann [Thu, 23 Nov 2006 08:03:02 +0000 (08:03 +0000)]
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.

17 years agoUse GMappedFile instead g_file_get_contents(). (build_instructions): Pass
Soren Sandmann [Thu, 23 Nov 2006 03:32:04 +0000 (03:32 +0000)]
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.

17 years agoMove match to front (add_trace_to_tree): Break as soon as a recursive call
Soren Sandmann [Wed, 22 Nov 2006 07:06:04 +0000 (07:06 +0000)]
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.

17 years agoreset the collector after generating the profile.
Soren Sandmann [Mon, 20 Nov 2006 07:25:02 +0000 (07:25 +0000)]
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.

17 years agoUse stack allocated variables to avoid taking addresses of bitfields.
Soren Sandmann [Mon, 20 Nov 2006 04:11:21 +0000 (04:11 +0000)]
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

17 years agoUse stack_node_new() o (profile_load): Use set_root() instead of
Soren Sandmann [Mon, 20 Nov 2006 04:08:01 +0000 (04:08 +0000)]
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

17 years agoDeclare bin_parser_free();
Soren Sandmann [Sun, 19 Nov 2006 22:48:28 +0000 (22:48 +0000)]
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.

18 years agofile announce-1.0.7 was initially added on branch sysprof-1-0.
Søren Sandmann Pedersen [Thu, 16 Nov 2006 14:40:59 +0000 (14:40 +0000)]
file announce-1.0.7 was initially added on branch sysprof-1-0.

18 years agoNew function
Soren Sandmann [Sat, 11 Nov 2006 03:34:40 +0000 (03:34 +0000)]
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.

18 years agoudpate
Søren Sandmann [Thu, 9 Nov 2006 22:55:53 +0000 (22:55 +0000)]
udpate

Thu Nov  9 17:55:24 2006  Søren Sandmann  <sandmann@redhat.com>

        * TODO (-): udpate

18 years agoStart with "/usr", not "usr". Pointed out by Tim Rowley.
Søren Sandmann [Thu, 9 Nov 2006 22:32:22 +0000 (22:32 +0000)]
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.

18 years agoLook in the correct directory for debug info files. (Tim Rowley)
Søren Sandmann [Thu, 9 Nov 2006 21:56:28 +0000 (21:56 +0000)]
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.

18 years agoAdd debug spew.
Søren Sandmann [Thu, 9 Nov 2006 21:17:59 +0000 (21:17 +0000)]
Add debug spew.

Thu Nov  9 16:17:11 2006  Søren Sandmann  <sandmann@redhat.com>

        * binfile.c: Add debug spew.

18 years agoDie immediately if the output file is a directory.
Søren Sandmann [Thu, 9 Nov 2006 21:02:31 +0000 (21:02 +0000)]
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.

18 years agoValgrind:
Soren Sandmann [Thu, 2 Nov 2006 08:33:35 +0000 (08:33 +0000)]
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).

18 years agoIncrease the max number of addresses to 1021, reorganise SysprofMmapArea
Soren Sandmann [Thu, 2 Nov 2006 06:54:12 +0000 (06:54 +0000)]
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

18 years agofile announce-1.0.5 was initially added on branch sysprof-1-0.
Søren Sandmann Pedersen [Mon, 30 Oct 2006 03:21:45 +0000 (03:21 +0000)]
file announce-1.0.5 was initially added on branch sysprof-1-0.

18 years agofile announce-1.0.4 was initially added on branch sysprof-1-0.
Søren Sandmann Pedersen [Mon, 30 Oct 2006 01:06:46 +0000 (01:06 +0000)]
file announce-1.0.4 was initially added on branch sysprof-1-0.

18 years agoCombine processes with identical commandlines here.
Soren Sandmann [Thu, 26 Oct 2006 05:49:01 +0000 (05:49 +0000)]
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.

18 years agoMake the pointer array static to improve cache behavior and reduce calls
Soren Sandmann [Thu, 26 Oct 2006 05:13:16 +0000 (05:13 +0000)]
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.

18 years agoIncomplete changelog
Søren Sandmann Pedersen [Wed, 25 Oct 2006 04:47:34 +0000 (04:47 +0000)]
Incomplete changelog

18 years ago+2006-10-25 Soren Sandmann <sandmann@daimi.au.dk> + + * process.c
Søren Sandmann Pedersen [Wed, 25 Oct 2006 04:47:06 +0000 (04:47 +0000)]
+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.
+

18 years agoreplace PAGE_SIZE macro with this function.
Soren Sandmann [Wed, 25 Oct 2006 02:02:44 +0000 (02:02 +0000)]
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.

18 years agoUse an array instead of list of maps.
Soren Sandmann [Tue, 24 Oct 2006 04:00:59 +0000 (04:00 +0000)]
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.

18 years agoUse PAGE_SIZE - 1 instead of 4096.
Soren Sandmann [Mon, 23 Oct 2006 13:02:40 +0000 (13:02 +0000)]
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.

18 years agoCommunicate traces to userspace through shared memory instead of copying.
Soren Sandmann [Mon, 23 Oct 2006 03:46:25 +0000 (03:46 +0000)]
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.

18 years agoSkip nodes that don't have a parent.
Soren Sandmann [Thu, 12 Oct 2006 03:45:21 +0000 (03:45 +0000)]
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.

18 years agoMake this function return a list of immediate callers again.
Soren Sandmann [Wed, 11 Oct 2006 05:37:24 +0000 (05:37 +0000)]
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.

18 years ago+2006-10-09 Soren Sandmann <sandmann@redhat.com>
Søren Sandmann Pedersen [Tue, 10 Oct 2006 00:52:44 +0000 (00:52 +0000)]
+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
+

18 years agoNew function.
Soren Sandmann [Mon, 9 Oct 2006 21:32:24 +0000 (21:32 +0000)]
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.

18 years agoDon't include bfd.h
Soren Sandmann [Mon, 9 Oct 2006 02:25:46 +0000 (02:25 +0000)]
Don't include bfd.h

2006-10-08   Soren Sandmann <sandmann@daimi.au.dk>

* binfile.c: Don't include bfd.h

18 years agoNew function to support --version option
Soren Sandmann [Sun, 8 Oct 2006 22:05:47 +0000 (22:05 +0000)]
New function to support --version option

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

* sysprof.c (process_options): New function to support --version option

18 years agoAdd a cache of the text section.
Soren Sandmann [Sun, 8 Oct 2006 20:14:25 +0000 (20:14 +0000)]
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

18 years agoRemove now unused load-address heuristic
Soren Sandmann [Sun, 8 Oct 2006 18:50:10 +0000 (18:50 +0000)]
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

18 years agoUse "SHT_DYNSYM" for ".dynsym".
Soren Sandmann [Sun, 8 Oct 2006 18:09:17 +0000 (18:09 +0000)]
Use "SHT_DYNSYM" for ".dynsym".

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

* elfparser.c (read_symbols): Use "SHT_DYNSYM" for ".dynsym".

18 years agoSupport _debuglink recursions.
Soren Sandmann [Sun, 8 Oct 2006 17:45:09 +0000 (17:45 +0000)]
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.

18 years agoDelete debug spew
Søren Sandmann Pedersen [Sun, 8 Oct 2006 04:07:18 +0000 (04:07 +0000)]
Delete debug spew

18 years agoDeal with address offsets. Address lookup is now:
Soren Sandmann [Sun, 8 Oct 2006 04:03:02 +0000 (04:03 +0000)]
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

18 years agoRemove old commented out code Add commented out code accessing entire
Soren Sandmann [Sat, 23 Sep 2006 03:09:24 +0000 (03:09 +0000)]
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.

18 years agoRevert accidental commit
Søren Sandmann Pedersen [Sat, 23 Sep 2006 00:57:20 +0000 (00:57 +0000)]
Revert accidental commit

18 years agoRemove old commented out code
Soren Sandmann [Sat, 23 Sep 2006 00:54:01 +0000 (00:54 +0000)]
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.

18 years agoFormatting fixes in header files
Søren Sandmann Pedersen [Sat, 26 Aug 2006 23:10:10 +0000 (23:10 +0000)]
Formatting fixes in header files

18 years agoUpdate to new API
Soren Sandmann [Sat, 26 Aug 2006 23:01:07 +0000 (23:01 +0000)]
Update to new API

2006-08-26  Soren Sandmann <sandmann@daimi.au.dk>

* elfparser.c: Update to new API

* binparser.h: Delete commented out declarations. Add new
functions.

* binparser.c: Delete ParserFrame, replace with one current
offset.
(convert_uint): Make static
(bin_parser_get_uint): Delete this function
(bin_parser_get_string): Change this function to use current
offset instead of frame offset.
(bin_parser_goto): New function
(bin_parser_align): New function
(bin_parser_get_uint32): New function
(bin_parser_begin): Delete this function
(bin_parser_end): Delete this function
(bin_parser_index): Delete this function
(bin_record_get_string_indirect): Make this function use _goto()
instead of _begin()/_end()
(bin_parser_get_offset): Make this function return current offset

18 years agoAdd new struct BinRecord. Comment out functions related to formats. Add
Soren Sandmann [Sat, 26 Aug 2006 22:44:12 +0000 (22:44 +0000)]
Add new struct BinRecord. Comment out functions related to formats. Add

2006-08-26  Soren Sandmann <sandmann@daimi.au.dk>

* binparser.[ch]: Add new struct BinRecord. Comment out functions
related to formats. Add new functions to get fields out of
BinRecords.

* elfparser.c: Update to new API.

18 years agoAdd new bin_record() functions Implement them.
Soren Sandmann [Sat, 26 Aug 2006 16:44:17 +0000 (16:44 +0000)]
Add new bin_record() functions Implement them.

2006-08-26  Soren Sandmann <sandmann@daimi.au.dk>

* binparser.h: Add new bin_record() functions
* binparser.c: Implement them.

18 years agoDemangle instead of strdup.
Soren Sandmann [Sat, 26 Aug 2006 16:27:00 +0000 (16:27 +0000)]
Demangle instead of strdup.

2006-08-22  Soren Sandmann <sandmann@daimi.au.dk>

* collector.c (unique_dup): Demangle instead of strdup.

18 years agoRename elf_sym_get_* to elf_parser_get_sym_* and make these functions take
Soren Sandmann [Tue, 22 Aug 2006 04:19:08 +0000 (04:19 +0000)]
Rename elf_sym_get_* to elf_parser_get_sym_* and make these functions take

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

* elfparser.[ch]
(elf_parser_get_sym_name): Rename elf_sym_get_* to
elf_parser_get_sym_* and make these functions take a parser.
(parser_from_sym): Delete this function.
(elf_parser_new): Don't add to all_elf_parsers
(elf_parser_free): Don't remove from all_elf_parsers
(elf_parser_new): Rename to parser_new_from_file()
(elf_parser_new_from_file): Rename to elf_parser_new

* binfile.c: Update for new elfparser API

* TODO: updates

18 years agoAdd ref_count and filename (bin_files): Add map from filenames to BinFiles
Soren Sandmann [Tue, 22 Aug 2006 03:26:57 +0000 (03:26 +0000)]
Add ref_count and filename (bin_files): Add map from filenames to BinFiles

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

* binfile.c (struct BinFile): Add ref_count and filename
(bin_files): Add map from filenames to BinFiles
(bin_file_new): First look for BinFile in the cache.
(bin_file_free): If refcount reaches 0, remove BinFile from cache.

* TODO: Updates

18 years agoPass map->bin_file to bin_symbol_get_name.
Soren Sandmann [Mon, 21 Aug 2006 06:00:57 +0000 (06:00 +0000)]
Pass map->bin_file to bin_symbol_get_name.

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

* process.c (process_lookup_symbol): Pass map->bin_file to
bin_symbol_get_name.

* binfile.h (bin_symbol_get_name): Add BinFile parameter

* elfparser.c (elf_demangle): Use options DMGL_PARAMS | DMGL_ANSI

* TODO: Updates

* binfile.c: Rewrite this file to use ElfParser instead of libbfd.

* configure.ac: Drop dependencies on libbfd and libiberty.

18 years agoUpdate
Soren Sandmann [Mon, 21 Aug 2006 05:00:53 +0000 (05:00 +0000)]
Update

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

* TODO: Update

* elfparser.c (elf_parser_lookup_symbol): Change sense of size
check.

18 years agoInitialize crc to 0xffffffff and invert it before returning.
Soren Sandmann [Mon, 21 Aug 2006 04:12:12 +0000 (04:12 +0000)]
Initialize crc to 0xffffffff and invert it before returning.

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

* elfparser.c (elf_parser_get_crc32): Initialize crc to 0xffffffff
and invert it before returning.

* elfparser.h: Declare elf_parser_get_debug_link()

18 years agoComment out debug spew. (elf_parser_lookup_symbol): Add check that address
Soren Sandmann [Mon, 21 Aug 2006 03:34:44 +0000 (03:34 +0000)]
Comment out debug spew. (elf_parser_lookup_symbol): Add check that address

2006-08-20  Soren Sandmann  <sandmann@daimi.au.dk>

* elfparser.c (elf_parser_get_load_address): Comment out debug spew.
(elf_parser_lookup_symbol): Add check that address is actually
within the bounds of the found function.

18 years agoMake process_lookup_symbol() return a string. Delete
Soren Sandmann [Mon, 21 Aug 2006 02:33:38 +0000 (02:33 +0000)]
Make process_lookup_symbol() return a string. Delete

2006-08-20  Soren Sandmann  <sandmann@daimi.au.dk>

* process.h: Make process_lookup_symbol() return a string. Delete
process_lookup_symbol_with_filename().

* process.c (struct Process): Make "undefined" a string
(lookup_kernel_symbol): Return a string
(process_lookup_symbol): Return a string, not a symbol

* collector.c (unique_dup): Take a string instead of a
Symbol.
(lookup_symbol): Make sym a string instead of a Symbol.

* binfile.c (bin_symbol_get_name): New function.

* binfile.[ch] (struct BinSymbol): Rename Symbol to BinSymbol and
make it an opaque structure.

* binfile.[ch]: Remove unused symbol operations

18 years agoNew function
Soren Sandmann [Mon, 21 Aug 2006 01:30:54 +0000 (01:30 +0000)]
New function

2006-08-20  Soren Sandmann <sandmann@daimi.au.dk>

* elfparser.c (elf_parser_new_from_file): New function

18 years agoNew function
Soren Sandmann [Mon, 21 Aug 2006 00:18:10 +0000 (00:18 +0000)]
New function

2006-08-20   Soren Sandmann <sandmann@daimi.au.dk>

* elfparser.c (elf_parser_get_debug_link): New function

* elfparser.c: Delete SymbolTable typedef

* binparser.[ch] (bin_parser_get_data): New function
(bin_parser_get_length): New function

* elfparser.[ch] (elf_parser_get_crc32): New function

* TODO: Updates

* elfparser.c (elf_parser_lookup_symbol): Offset passed in
addresses by the load address.

* elfparser.c (elf_parser_get_load_address): New function to
compute the load address of the beginning of the file.

18 years agoRead the name out of the file instead of out of the struct.
Soren Sandmann [Sun, 20 Aug 2006 06:26:54 +0000 (06:26 +0000)]
Read the name out of the file instead of out of the struct.

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

* elfparser.c (elf_sym_get_name): Read the name out of the file
instead of out of the struct.

* elfparser.c (struct ElfSym): Store an offset instead of the
name.

* elfparser.c (all_elf_parsers): Keep track of all elf parsers
created.

18 years agoNew file, made out of files from libiberty in binutils.
Soren Sandmann [Sun, 20 Aug 2006 04:32:12 +0000 (04:32 +0000)]
New file, made out of files from libiberty in binutils.

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

* Makefile.am, demangle.c: New file, made out of files from
libiberty in binutils.

* binfile.c: Use the new sysprof_cplus_demangle() function

* elfparser.[ch]: Add code to lookup symbols. Add demangling
function

* testelf.c: Various tests

18 years agoMany cleanups.
Soren Sandmann [Sat, 19 Aug 2006 23:56:18 +0000 (23:56 +0000)]
Many cleanups.

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

* elfparser.c: Many cleanups.

18 years agoPass the correct pointer.
Søren Sandmann [Wed, 16 Aug 2006 17:25:03 +0000 (17:25 +0000)]
Pass the correct pointer.

2006-08-16  Søren Sandmann  <ssp@localhost.localdomain>

* elfparser.c (check_symbol): Pass the correct pointer.

18 years agoReally add this file.
Soren Sandmann [Wed, 16 Aug 2006 17:21:54 +0000 (17:21 +0000)]
Really add this file.

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

* testelf.c: Really add this file.

18 years agoAdd beginning of an ELF parser.
Soren Sandmann [Wed, 16 Aug 2006 03:31:10 +0000 (03:31 +0000)]
Add beginning of an ELF parser.

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

Add beginning of an ELF parser.

* binparser.[ch]: New files
* elfparser.[ch]: New files
* testelf.c: New file
* Makefile.am (testelf_SOURCES): Add new testelf program.

18 years agoSome formatting fixes.
Søren Sandmann [Sat, 12 Aug 2006 20:40:58 +0000 (20:40 +0000)]
Some formatting fixes.

Sat Aug 12 16:40:38 2006  Søren Sandmann  <sandmann@redhat.com>

* module/sysprof-module.c: Some formatting fixes.

18 years agoMake n_samples per-cpu. Add an atomic variable in_timer_notify and use it
Søren Sandmann [Sat, 12 Aug 2006 20:15:52 +0000 (20:15 +0000)]
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

18 years agoUpdates
Søren Sandmann [Fri, 11 Aug 2006 15:41:46 +0000 (15:41 +0000)]
Updates

Fri Aug 11 11:41:15 2006  Søren Sandmann  <sandmann@redhat.com>

* TODO: Updates

18 years agoIncomplete ChangeLog entry
Søren Sandmann Pedersen [Wed, 9 Aug 2006 03:06:04 +0000 (03:06 +0000)]
Incomplete ChangeLog entry

18 years agoMake the load_file() idle low priority to avoid weird toolbar flash.
Soren Sandmann [Wed, 9 Aug 2006 03:05:34 +0000 (03:05 +0000)]
Make the load_file() idle low priority to avoid weird toolbar flash.

2006-08-08  Soren Sandmann  <ssp@localhost.localdomain>

* sysprof.c (main): Make the load_file() idle low priority to
avoid weird toolbar flash.

* TODO: updates.

18 years agosmall cleanup
Paolo Borelli [Mon, 31 Jul 2006 18:52:12 +0000 (18:52 +0000)]
small cleanup

18 years agoAdd a destroy notifier to StackStash
Soren Sandmann [Mon, 31 Jul 2006 04:50:34 +0000 (04:50 +0000)]
Add a destroy notifier to StackStash

2006-07-31  Soren Sandmann <sandmann@redhat.com>

* stackstash.[ch]: Add a destroy notifier to StackStash

* collector.c (collector_create_profile): Pass g_free as destroy
notifier.

* collector.c (collector_reset): Pass NULL as destroy notifier

* profile.c (profile_load): Pass g_free here.

* profile.c (struct Profile): Remove unused "Node" typedef

* collector.c (resolve_symbols): Free the array here.

* TODO: various updates.

18 years agoSimplify this file a bit, and make it not rely on atomic pointer writes.
Soren Sandmann [Mon, 31 Jul 2006 02:12:23 +0000 (02:12 +0000)]
Simplify this file a bit, and make it not rely on atomic pointer writes.

2006-07-30  Soren Sandmann <sandmann@redhat.com>

* signal-handler.c: Simplify this file a bit, and make it not rely
on atomic pointer writes.

18 years agowe need at least glib 2.6.0 for the gstdio.h functions
Bastien Nocera [Tue, 18 Jul 2006 16:32:05 +0000 (16:32 +0000)]
we need at least glib 2.6.0 for the gstdio.h functions

2006-07-18  Bastien Nocera  <hadess@hadess.net>

* configure.ac: we need at least glib 2.6.0 for the gstdio.h functions

18 years agoUpdate TODO
Søren Sandmann Pedersen [Fri, 9 Jun 2006 21:55:45 +0000 (21:55 +0000)]
Update TODO

18 years agofile announce-1.0.3 was initially added on branch sysprof-1-0.
Søren Sandmann Pedersen [Fri, 9 Jun 2006 03:08:38 +0000 (03:08 +0000)]
file announce-1.0.3 was initially added on branch sysprof-1-0.

18 years agoUpdate TODO
Søren Sandmann Pedersen [Wed, 7 Jun 2006 16:18:44 +0000 (16:18 +0000)]
Update TODO

18 years agoUpdates
Soren Sandmann [Mon, 5 Jun 2006 22:38:30 +0000 (22:38 +0000)]
Updates

2006-06-05  Soren Sandmann <sandmann@redhat.com>

* TODO: Updates

18 years agoupdates Various formatting fixes.
Soeren Sandmann [Sat, 22 Apr 2006 19:08:23 +0000 (19:08 +0000)]
updates Various formatting fixes.

Sat Apr 22 15:08:01 2006  Soeren Sandmann  <sandmann@redhat.com>

* TODO: updates
* profile.c, sfile.c, sformat.c: Various formatting fixes.

18 years agoupdates
Søren Sandmann [Wed, 5 Apr 2006 15:26:47 +0000 (15:26 +0000)]
updates

Wed Apr  5 11:26:30 2006  Søren Sandmann  <sandmann@redhat.com>

        * TODO: updates

18 years agoUpdates.
Soeren Sandmann [Tue, 28 Mar 2006 04:08:14 +0000 (04:08 +0000)]
Updates.

Mon Mar 27 23:04:30 2006  Soeren Sandmann  <sandmann@redhat.com>

        * TODO: Updates.

        * sfile.c (handle_{begin,end}_element): Don't generate begin/end
        instructions for value elements.

        * sfile.c (build_instructions): Remove debugging spew.

18 years agoNew files containing a simplified and sanitized version of the state
Soeren Sandmann [Tue, 28 Mar 2006 03:02:21 +0000 (03:02 +0000)]
New files containing a simplified and sanitized version of the state

Mon Mar 27 21:44:04 2006  Soeren Sandmann  <sandmann@redhat.com>

        * sformat.[ch]: New files containing a simplified and sanitized
        version of the state machine and type system from sfile.c.

        * sfile.c: Move the state machine and type management to separate
        files. Make the amount of memory used during loading and saving
        less obscene.

        * stackstash.c (stack_stash_new_from_root): Make this function
        store the root again.

18 years agoupdates
Søren Sandmann [Mon, 27 Mar 2006 14:57:14 +0000 (14:57 +0000)]
updates

Mon Mar 27 09:55:01 2006  Søren Sandmann  <sandmann@redhat.com>

        * TODO: updates

18 years agoupdates
Soren Sandmann [Sun, 12 Mar 2006 04:00:23 +0000 (04:00 +0000)]
updates

2006-03-11 Soren Sandmann <sandmann@redhat.com>

* TODO: updates

* stackstash.[ch]: Make stackstash refcounted

* collector.c, profile.c: Update for refcounted stackstash, plug
leak.

* collector.c (open_fd): Remove FIXME comment

18 years agoDo proper error-handling.
Soeren Sandmann [Sun, 5 Mar 2006 21:11:07 +0000 (21:11 +0000)]
Do proper error-handling.

2006-03-05 Soeren Sandmann <sandmann@redhat.com>

        * sysprof-text.c, collector.c, sysprof.c: Do proper
        error-handling.

18 years agoCheck that the inodes match.
Soeren Sandmann [Sat, 4 Mar 2006 03:28:26 +0000 (03:28 +0000)]
Check that the inodes match.

Fri Mar  3 22:28:03 2006  Soeren Sandmann  <sandmann@redhat.com>

        * process.c (process_lookup_symbol): Check that the inodes match.

        * binfile.c (read_symbols): Read the inode of the file

        * binfile.c (read_symbols): Close the bfd if the symbol table
        could not be read.