[sysprof/ftrace] Set SYSPROF_MAX_ADDRESSES to 1024 instead of 128.



commit 196c348aff976017f61d87b952f519a21238ccd4
Author: Søren Sandmann Pedersen <sandmann daimi au dk>
Date:   Sat Aug 15 03:20:38 2009 -0400

    Set SYSPROF_MAX_ADDRESSES to 1024 instead of 128.
    
    Delete inflight stacktraces on reset.

 collector.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/collector.c b/collector.c
index b46d8d1..b3bd984 100644
--- a/collector.c
+++ b/collector.c
@@ -52,8 +52,7 @@ enum
 
 typedef struct SysprofStackTrace SysprofStackTrace;
 
-#define SYSPROF_N_TRACES	64
-#define SYSPROF_MAX_ADDRESSES	128
+#define SYSPROF_MAX_ADDRESSES	1024
 
 struct CPUInfo
 {
@@ -396,6 +395,15 @@ on_read (gpointer data)
 	g_warning ("Read from trace pipe: %s\n", strerror (errno));
 }
 
+static void
+erase_inflight_traces (Collector *collector)
+{
+    int i;
+    
+    for (i = 0; i < N_CPU; ++i)
+	collector->cpu_info[i].pid = -1;
+}
+
 static gboolean
 start_tracing (Collector  *collector,
 	       GError    **err)
@@ -455,8 +463,7 @@ start_tracing (Collector  *collector,
     
     collector->fd = fd;
 
-    for (i = 0; i < N_CPU; ++i)
-	collector->cpu_info[i].pid = -1;
+    erase_inflight_traces (collector);
     
     return TRUE;
 }
@@ -503,6 +510,8 @@ collector_reset (Collector *collector)
 
     collector->stash = stack_stash_new (NULL);
     collector->n_samples = 0;
+
+    erase_inflight_traces (collector);
     
     g_get_current_time (&collector->latest_reset);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]