mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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.
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
e2150fc188
commit
d78e744422
13
process.c
13
process.c
@ -424,8 +424,6 @@ file_exists (const char *name)
|
||||
int fd;
|
||||
fd = open (name, O_RDONLY);
|
||||
|
||||
g_print ("trying: %s\n", name);
|
||||
|
||||
if (fd > 0)
|
||||
{
|
||||
close (fd);
|
||||
@ -565,16 +563,7 @@ lookup_kernel_symbol (gulong address)
|
||||
{
|
||||
static const char *const kernel = "In kernel";
|
||||
|
||||
#if 0
|
||||
g_print ("kernel binary: %s\n", find_kernel_binary ());
|
||||
#endif
|
||||
|
||||
return kernel; /* Can we just return "In kernel"? */
|
||||
#if 0
|
||||
kernel.name = "In kernel";
|
||||
kernel.address = 0x00001337;
|
||||
return &kernel;
|
||||
#endif
|
||||
return kernel;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
||||
Reference in New Issue
Block a user