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-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-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-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 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-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-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
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.
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
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
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()
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.
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
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.
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.
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
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.
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