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:
Soren Sandmann
2006-10-26 05:13:16 +00:00
committed by Søren Sandmann Pedersen
parent e2150fc188
commit d78e744422
4 changed files with 17 additions and 15 deletions

View File

@ -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 *