Use an array instead of a list. Look for vmlinux in the source directory.

2007-10-22  Soren Sandmann <sandmann@daimi.au.dk>

        * process.c (look_for_vmlinux): Use an array instead of a
        list. Look for vmlinux in the source directory.

        * elfparser.c (elf_parser_get_crc32): Only use MADV_DONTNEED if
        the data is file-backed.

        * TODO: updates.

        Various formatting fixes


svn path=/trunk/; revision=385
This commit is contained in:
Soren Sandmann
2007-10-25 02:45:54 +00:00
committed by Søren Sandmann Pedersen
parent 97076b7d0f
commit 1867b97a8d
6 changed files with 138 additions and 74 deletions

View File

@ -275,7 +275,8 @@ open_fd (Collector *collector,
}
}
map_area = mmap (NULL, sizeof (SysprofMmapArea), PROT_READ, MAP_SHARED, fd, 0);
map_area = mmap (NULL, sizeof (SysprofMmapArea),
PROT_READ, MAP_SHARED, fd, 0);
if (map_area == MAP_FAILED)
{
@ -387,7 +388,12 @@ lookup_symbol (Process *process, gpointer address,
gulong offset;
sym = process_lookup_kernel_symbol ((gulong)address, &offset);
/* If offset is 0, it is a callback, not a return address */
/* If offset is 0, it is a callback, not a return address.
*
* If "first_kernel_addr" is true, then the address is an
* instruction pointer, not a return address, so it may
* legitimately be at offset 0.
*/
if (offset == 0 && !first_kernel_addr)
sym = NULL;
@ -438,6 +444,7 @@ resolve_symbols (GList *trace, gint size, gpointer data)
if (address == GINT_TO_POINTER (0x01))
in_kernel = FALSE;
symbol = lookup_symbol (process, address, info->unique_symbols,
in_kernel, first_kernel_addr);
first_kernel_addr = FALSE;