summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2009-09-07 21:22:48 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2009-09-08 03:03:08 -0400
commit29e270cb8d2fe0273e91118627a65f24d480b540 (patch)
treece85b4da39cbb86c50b8ec7f4711c2b79b27514d
parentd34a1cf460231e8d57262c1651ac50e15496b734 (diff)
Various debug spew
-rw-r--r--collector.c5
-rw-r--r--tracker.c15
2 files changed, 14 insertions, 6 deletions
diff --git a/collector.c b/collector.c
index 3c54e2d..230e406 100644
--- a/collector.c
+++ b/collector.c
@@ -237,7 +237,8 @@ on_read (gpointer data)
/* FIXME: return proper errors */
#define fail(x) \
do { \
- g_printerr ("the fail is strong %s\n", x); \
+ g_printerr ("the fail is "); \
+ perror (x); \
exit (-1); \
} while (0)
@@ -404,6 +405,8 @@ collector_new (CollectorFunc callback,
static void
process_mmap (Collector *collector, mmap_event_t *mmap)
{
+ g_print ("%d %d => %s at %llx\n", mmap->pid, mmap->tid, mmap->filename, mmap->addr);
+
tracker_add_map (collector->tracker,
mmap->pid,
mmap->addr,
diff --git a/tracker.c b/tracker.c
index 3e0908b..d329c2a 100644
--- a/tracker.c
+++ b/tracker.c
@@ -287,9 +287,7 @@ tracker_add_map (tracker_t * tracker,
tracker_append (tracker, &event, sizeof (event));
-#if 0
- g_print (" Added new map: %d (%s)\n", pid, filename);
-#endif
+ g_print (" Added new map: %d (%s) %llx -- %llx \n", pid, filename, start, end);
}
void
@@ -644,7 +642,7 @@ process_locate_map (process_t *process, gulong addr)
}
const char *
-lookup_user_symbol (process_t *process, gulong address)
+lookup_user_symbol (process_t *process, uint64_t address)
{
static const char *const kernel = "[kernel]";
const BinSymbol *result;
@@ -662,6 +660,8 @@ lookup_user_symbol (process_t *process, gulong address)
{
if (!process->undefined)
{
+ g_print ("no map for %llx in %d (%s)\n", address, process->pid, process->comm);
+
process->undefined =
g_strdup_printf ("No map (%s)", process->comm);
}
@@ -807,7 +807,12 @@ process_sample (state_t *state, StackStash *resolved, sample_t *sample)
if (!process)
{
- g_warning ("sample for unknown process %d\n", sample->pid);
+ static gboolean warned;
+ if (!warned)
+ {
+ g_warning ("sample for unknown process %d", sample->pid);
+ warned = TRUE;
+ }
return;
}