mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Initialize offset to 1. Don't do kernel lookup for unmapped addresses.
2008-02-23 Soren Sandmann <sandmann@redhat.com> * process.c (process_lookup_symbol): Initialize offset to 1. Don't do kernel lookup for unmapped addresses. svn path=/trunk/; revision=398
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
b98db05f9b
commit
a585265cee
@ -1,3 +1,8 @@
|
||||
2008-02-23 Soren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* process.c (process_lookup_symbol): Initialize offset to 1. Don't
|
||||
do kernel lookup for unmapped addresses.
|
||||
|
||||
2008-02-17 Soren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* collector.c (lookup_symbol): Add commented out code to reject
|
||||
|
||||
16
process.c
16
process.c
@ -668,7 +668,7 @@ process_lookup_kernel_symbol (gulong address,
|
||||
result = do_lookup ((KernelSymbol *)ksyms->data, address, 0, ksyms->len - 1);
|
||||
if (result && offset)
|
||||
*offset = address - result->address;
|
||||
|
||||
|
||||
return result? result->name : NULL;
|
||||
}
|
||||
|
||||
@ -681,18 +681,20 @@ process_lookup_symbol (Process *process, gulong address, gulong *offset)
|
||||
|
||||
/* g_print ("addr: %x\n", address); */
|
||||
|
||||
if (offset)
|
||||
{
|
||||
/* If we don't have any offset, just return 1, so it doesn't
|
||||
* look like a callback
|
||||
*/
|
||||
*offset = 1;
|
||||
}
|
||||
|
||||
if (address == 0x1)
|
||||
{
|
||||
return kernel;
|
||||
}
|
||||
else if (!map)
|
||||
{
|
||||
gulong offset;
|
||||
const char *res = process_lookup_kernel_symbol (address, &offset);
|
||||
|
||||
if (res && offset != 0)
|
||||
return res;
|
||||
|
||||
if (!process->undefined)
|
||||
{
|
||||
process->undefined =
|
||||
|
||||
Reference in New Issue
Block a user