mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
updates
Sat Oct 29 14:29:55 2005 Søren Sandmann <sandmann@redhat.com> * README, TODO: updates
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
3d43e894fd
commit
d598799b23
@ -1,3 +1,7 @@
|
||||
Sat Oct 29 14:29:55 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* README, TODO: updates
|
||||
|
||||
Fri Oct 14 11:44:43 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* configure.ac: Add a warning about known bugs in the kernel
|
||||
|
||||
35
README
35
README
@ -17,7 +17,6 @@ would be appreciated.
|
||||
|
||||
|
||||
|
||||
|
||||
Requirements:
|
||||
|
||||
- A Linux kernel version 2.6.11 or newer is required.
|
||||
@ -25,7 +24,7 @@ Requirements:
|
||||
|
||||
- GTK+ 2.6.0 or newer is required
|
||||
|
||||
- libglade 2.5.1 is required
|
||||
- libglade 2.5.1 or newer is required
|
||||
|
||||
|
||||
Compiling:
|
||||
@ -35,28 +34,31 @@ Compiling:
|
||||
system compiler, but if you have upgraded your kernel it is
|
||||
possible that the new kernel was compiled with a different compiler
|
||||
|
||||
In that case, "modprobe sysprof-module" will produce this
|
||||
If the module is compiled with a different compiler than the one
|
||||
compiling the kernel, "modprobe sysprof-module" will produce this
|
||||
error message:
|
||||
|
||||
insmod: error inserting './sysprof-module.o': -1 Invalid module format
|
||||
|
||||
|
||||
|
||||
Debugging symbols
|
||||
|
||||
- The programs you want to profile should have debugging symbols, or
|
||||
you won't get much usable information. On a Fedora Core system,
|
||||
installing the relevant -debuginfo package should be sufficient.
|
||||
- The programs and libraries you want to profile should have debugging
|
||||
symbols, or you won't get much usable information. On a Fedora Core system,
|
||||
installing the relevant <package>-debuginfo package should be sufficient.
|
||||
On Ubuntu and Debian, the debug packages are called <package>-dbg.
|
||||
|
||||
|
||||
- X server.
|
||||
- X server
|
||||
|
||||
The X server as shipped by most distributions uses its own home-rolled
|
||||
module loading system and Sysprof has no way to deal with that, so if you
|
||||
run sysprof with your normal X serverr you won't get any information about
|
||||
run sysprof with your normal X server you won't get any information about
|
||||
how time is spent inside the X server.
|
||||
|
||||
To fix this you have to compile your own X server:
|
||||
On Ubuntu and Debian there is a package, xserver-xorg-dbg, containing a
|
||||
binary called Xorg-debug that is built in such a way that sysprof can use
|
||||
it. On other systems, to get an X server with usable symbols you
|
||||
have to compile your own:
|
||||
|
||||
(1) Compile the X server to use ".so" modules:
|
||||
|
||||
@ -64,17 +66,20 @@ Debugging symbols
|
||||
xc/config/cf/xorgsite.def.
|
||||
|
||||
If you are compiling the CVS version of the X server
|
||||
(the one that will eventually become 7.0), then this is
|
||||
(the one that will eventually become 6.9), then this is
|
||||
already the default.
|
||||
|
||||
- "make World"
|
||||
|
||||
- Don't run "make install" yet. (See below).
|
||||
|
||||
(2) Install the X server making sure it can't see any ".a" files. If
|
||||
you install on top of an existing installation, just do
|
||||
(2) Make sure the new X server can't see any old ".a" files lying
|
||||
around. If you install on top of an existing installation, just do
|
||||
|
||||
find /usr/X11R6/lib/"*.a" | sudo xargs rm
|
||||
|
||||
and install the newly compiled X server.
|
||||
then run "make install" as root to install the newly compiled
|
||||
X server.
|
||||
|
||||
If a ".so" X server finds .a files in its module path it will
|
||||
try to load those in preference to .so files and this causes
|
||||
|
||||
23
TODO
23
TODO
@ -5,9 +5,6 @@ Before 1.0.1:
|
||||
This is just the (deleted) problem.
|
||||
|
||||
* Build system
|
||||
- Find out what distributions it actually works on
|
||||
(ask for sucess/failure-stories in 1.0 releases)
|
||||
|
||||
- Create RPM package? See fedora-packaging-list for information
|
||||
about how to package kernel modules. Lots of threads in
|
||||
June 2005 and forward.
|
||||
@ -16,6 +13,18 @@ Before 1.0.1:
|
||||
|
||||
Before 1.2:
|
||||
|
||||
* Crash reported by Rudi Chiarito with n_addrs == 0.
|
||||
|
||||
* Find out why we get hangs with rawhide kernels. This only happens with the
|
||||
'trace "current"' code. See this mail:
|
||||
|
||||
http://mail.nl.linux.org/kernelnewbies/2005-08/msg00157.html
|
||||
|
||||
esp0 points to top of kernel stack
|
||||
esp points to top of user stack
|
||||
|
||||
(Reported by Kjartan Marass).
|
||||
|
||||
* Figure out how to make sfile.[ch] use less memory.
|
||||
- In general clean sfile.[ch] up a little:
|
||||
- split out dfa in its own generic class
|
||||
@ -443,7 +452,13 @@ Later:
|
||||
|
||||
DONE:
|
||||
|
||||
Before 1.0:
|
||||
* Find out what distributions it actually works on
|
||||
(ask for sucess/failure-stories in 1.0 releases)
|
||||
|
||||
* Add note in README about Ubuntu and Debian -dbg packages and how to get
|
||||
debug symbols for X there.
|
||||
|
||||
* Before 1.0:
|
||||
|
||||
- Update version numbers in source
|
||||
|
||||
|
||||
99
xmlstore.c
Normal file
99
xmlstore.c
Normal file
@ -0,0 +1,99 @@
|
||||
typedef struct ParsedItem ParsedItem;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BEGIN,
|
||||
TEXT,
|
||||
END
|
||||
} XmlItemType;
|
||||
|
||||
struct XmlItem
|
||||
{
|
||||
XmlItemType type;
|
||||
char [1] data;
|
||||
};
|
||||
|
||||
struct XmlStore
|
||||
{
|
||||
XmlItem * items;
|
||||
|
||||
GHashTable *user_data_map;
|
||||
};
|
||||
|
||||
struct ParsedItem
|
||||
{
|
||||
XmlItemType type;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
char * element;
|
||||
int n_attrs;
|
||||
char **attr;
|
||||
} begin_item;
|
||||
|
||||
struct
|
||||
{
|
||||
char *text;
|
||||
} text_item;
|
||||
|
||||
struct
|
||||
{
|
||||
char *element;
|
||||
} end_item;
|
||||
} u;
|
||||
};
|
||||
|
||||
static void
|
||||
parse_begin_item (XmlItem *item,
|
||||
ParsedItem *parsed_item)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
parse_end_item (XmlItem *item,
|
||||
ParsedItem *parsed_item)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
parse_text_item (XmlItem *item,
|
||||
ParsedItem *parsed_item)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static ParsedItem *
|
||||
parsed_item_new (XmlItem *item)
|
||||
{
|
||||
ParsedItem *parsed_item = g_new0 (ParsedItem, 0);
|
||||
|
||||
switch (item->type)
|
||||
{
|
||||
case BEGIN:
|
||||
parsed_item->type = BEGIN;
|
||||
parse_begin_item (item, parsed_item);
|
||||
break;
|
||||
|
||||
case END:
|
||||
parsed_item->type = END;
|
||||
parse_end_item (item, parsed_item);
|
||||
break;
|
||||
|
||||
case TEXT:
|
||||
parsed_item->type = TEXT;
|
||||
parse_text_item (item, parsed_item);
|
||||
break;
|
||||
}
|
||||
|
||||
return parsed_item;
|
||||
}
|
||||
|
||||
static void
|
||||
parsed_item_free (ParsedItem *item)
|
||||
{
|
||||
|
||||
}
|
||||
58
xmlstore.h
Normal file
58
xmlstore.h
Normal file
@ -0,0 +1,58 @@
|
||||
typedef struct XmlIter XmlIter;
|
||||
typedef struct XmlStore XmlStore;
|
||||
|
||||
XmlStore *xml_store_new (void);
|
||||
void xml_store_free (XmlStore *store);
|
||||
void xml_store_append_begin (XmlStore *store,
|
||||
const char *element);
|
||||
void xml_store_append_end (XmlStore *store,
|
||||
const char *element);
|
||||
void xml_store_append_text (XmlStore *store,
|
||||
const char *text);
|
||||
void xml_store_write (XmlStore *store,
|
||||
const char *file,
|
||||
GError *file);
|
||||
void xml_store_set_data (XmlIter *iter,
|
||||
gpointer data);
|
||||
gpointer xml_store_get_data (XmlIter *iter,
|
||||
gpointer data);
|
||||
void xml_store_has_data (XmlIter *iter);
|
||||
|
||||
/* An iter stays valid as long as the XmlStore is valid */
|
||||
XmlIter * xml_store_get_iter (XmlStore *store);
|
||||
XmlIter * xml_iter_get_sibling (XmlIter *iter);
|
||||
XmlIter * xml_iter_get_child (XmlIter *iter);
|
||||
int xml_iter_get_n_children (XmlIter *iter);
|
||||
gboolean xml_iter_valid (XmlIter *iter);
|
||||
|
||||
|
||||
void
|
||||
process_tree (XmlIter *iter)
|
||||
{
|
||||
XmlIter *i;
|
||||
|
||||
if (!xml_iter_valid (iter))
|
||||
return;
|
||||
|
||||
/* siblings */
|
||||
i = xml_iter_sibling (iter);
|
||||
while (xml_iter_valid (i))
|
||||
{
|
||||
process_tree (i);
|
||||
|
||||
i = xml_iter_sibling (i);
|
||||
}
|
||||
|
||||
/* children */
|
||||
process_tree (xml_iter_child (iter));
|
||||
|
||||
|
||||
process_tree (xml_iter_sibling (iter));
|
||||
process_tree (xml_iter_child (iter));
|
||||
}
|
||||
|
||||
void
|
||||
process_store (XmlStore *store)
|
||||
{
|
||||
process_tree (xml_store_get_iter (store));
|
||||
}
|
||||
Reference in New Issue
Block a user