mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Apply patch from binutils to demangle local-source names. Binutils
Wed Jun 4 21:52:17 2008 Søren Sandmann <sandmann@redhat.com> * demangle.c: Apply patch from binutils to demangle local-source names. Binutils changelog: 2007-05-05 Geoffrey Keating <geoffk@apple.com> * cp-demangle.c (d_name): Detect local-source-name. (d_prefix): Likewise. (d_unqualified_name): Implement local-source-name. * sysprof.c: Update copyright statement svn path=/trunk/; revision=434
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
155221f446
commit
e11dfce31f
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
Wed Jun 4 21:52:17 2008 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* demangle.c: Apply patch from binutils to demangle local-source
|
||||
names. Binutils changelog:
|
||||
|
||||
2007-05-05 Geoffrey Keating <geoffk@apple.com>
|
||||
|
||||
* cp-demangle.c (d_name): Detect local-source-name.
|
||||
(d_prefix): Likewise.
|
||||
(d_unqualified_name): Implement local-source-name.
|
||||
|
||||
* sysprof.c: Update copyright statement
|
||||
|
||||
Mon Jun 2 01:35:25 2008 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* demangle.c: Remove weird comment.
|
||||
|
||||
31
TODO
31
TODO
@ -23,9 +23,14 @@ Before 1.0.4:
|
||||
|
||||
Before 1.2:
|
||||
|
||||
* For glibc, the debug files do not contain .strtab and .symtab, but
|
||||
the original files do. The algorithm in binfile.c must be modified
|
||||
accordingly.
|
||||
* Hack to disable recursion for binaries without symbols causes the
|
||||
symbols to not work the way other symbols do. A better approach is
|
||||
probably to simply generate a new symbol for every appearance except
|
||||
leaf nodes, which should still be considered one symbol (or maybe be
|
||||
considered the same symbol if they have the same parent). In fact
|
||||
"has same parent" may be the correct criterion in all cases.
|
||||
|
||||
* It crashes sometimes.
|
||||
|
||||
* Find out what is going on with kernel threads:
|
||||
|
||||
@ -40,9 +45,10 @@ Before 1.2:
|
||||
|
||||
* Is the move-to-front in process_locate_map() really worth it?
|
||||
|
||||
* Whenever we fail to lock the atomic variable, track this, and send the information
|
||||
to userspace as an indication of the overhead of the profiling. Although there is
|
||||
inherent aliasing here since stack scanning happens at regular intervals.
|
||||
* Whenever we fail to lock the atomic variable, track this, and send the
|
||||
information to userspace as an indication of the overhead of the profiling.
|
||||
Although there is inherent aliasing here since stack scanning happens at
|
||||
regular intervals.
|
||||
|
||||
* Apparently, if you upgrade the kernel, then don't re-run configure,
|
||||
the kernel Makefile will delete all of /lib/modules/<release>/kernel
|
||||
@ -823,6 +829,19 @@ Later:
|
||||
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ALREADY DONE: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
* Find out why the strings
|
||||
|
||||
_ZL11DisplayLineP20nsDisplayListBuilderRK6nsRectS3_R19nsLineList_iteratoriRiRK16nsDisplayListSetP12nsBlockFrame
|
||||
_ZL11DisplayRowsP20nsDisplayListBuilderP7nsFrameRK6nsRectRK16nsDisplayListSet _ZL11DrawBordersP10gfxContextR7gfxRectS2_PhPdS4_PjPP14nsBorderColorsijiP6nsRect _ZL11HandleEventP10nsGUIEvent
|
||||
_ZL12IsContentLEQP13nsDisplayItemS0_Pv
|
||||
_ZL15expose_event_cbP10_GtkWidgetP15_GdkEventExpose
|
||||
|
||||
do not get demangled.
|
||||
|
||||
* For glibc, the debug files do not contain .strtab and .symtab, but
|
||||
the original files do. The algorithm in binfile.c must be modified
|
||||
accordingly.
|
||||
|
||||
* If we profile something that is not very CPU bound, sysprof itself
|
||||
seems to get a disproportionate amount of the samples. Should look
|
||||
into this. Fixed by only returning from poll when there is more
|
||||
|
||||
19
demangle.c
19
demangle.c
@ -1944,7 +1944,8 @@ d_prefix (di)
|
||||
if (IS_DIGIT (peek)
|
||||
|| IS_LOWER (peek)
|
||||
|| peek == 'C'
|
||||
|| peek == 'D')
|
||||
|| peek == 'D'
|
||||
|| peek == 'L')
|
||||
dc = d_unqualified_name (di);
|
||||
else if (peek == 'S')
|
||||
dc = d_substitution (di, 1);
|
||||
@ -1978,6 +1979,9 @@ d_prefix (di)
|
||||
/* <unqualified-name> ::= <operator-name>
|
||||
::= <ctor-dtor-name>
|
||||
::= <source-name>
|
||||
::= <local-source-name>
|
||||
|
||||
<local-source-anem> ::= L <source-name><discriminator>
|
||||
*/
|
||||
|
||||
static struct demangle_component *
|
||||
@ -2000,6 +2004,19 @@ d_unqualified_name (di)
|
||||
}
|
||||
else if (peek == 'C' || peek == 'D')
|
||||
return d_ctor_dtor_name (di);
|
||||
else if (peek == 'L')
|
||||
{
|
||||
struct demangle_component * ret;
|
||||
|
||||
d_advance (di, 1);
|
||||
|
||||
ret = d_source_name (di);
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
if (! d_discriminator (di))
|
||||
return NULL;
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -651,11 +651,11 @@ elf_parser_get_text_offset (ElfParser *parser)
|
||||
static gchar *
|
||||
make_hex_string (const guchar *data, int n_bytes)
|
||||
{
|
||||
GString *string = g_string_new (NULL);
|
||||
const char hex_digits[] = {
|
||||
static const char hex_digits[] = {
|
||||
'0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
|
||||
};
|
||||
GString *string = g_string_new (NULL);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_bytes; ++i)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* Sysprof -- Sampling, systemwide CPU profiler
|
||||
* Copyright 2004, Red Hat, Inc.
|
||||
* Copyright 2004, 2005, 2006, 2007, Soeren Sandmann
|
||||
* Copyright 2004, 2005, 2006, 2007, 2008, Soeren Sandmann
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -665,7 +665,7 @@ on_about_activated (GtkWidget *widget, gpointer data)
|
||||
gtk_show_about_dialog (GTK_WINDOW (app->main_window),
|
||||
"logo", app->icon,
|
||||
name_property, APPLICATION_NAME,
|
||||
"copyright", "Copyright 2004-2007, S"OSLASH"ren Sandmann",
|
||||
"copyright", "Copyright 2004-2008, S"OSLASH"ren Sandmann",
|
||||
"version", PACKAGE_VERSION,
|
||||
NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user