summaryrefslogtreecommitdiffstats
path: root/src/vlib/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/trace.c')
-rw-r--r--src/vlib/trace.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vlib/trace.c b/src/vlib/trace.c
index abd116622c7..f90f275fa87 100644
--- a/src/vlib/trace.c
+++ b/src/vlib/trace.c
@@ -201,6 +201,15 @@ filter_accept (vlib_trace_main_t * tm, vlib_trace_header_t * h)
if (tm->filter_flag == 0)
return 1;
+ /*
+ * When capturing a post-mortem dispatch trace,
+ * toss all existing traces once per dispatch cycle.
+ * So we can trace 4 billion pkts without running out of
+ * memory...
+ */
+ if (tm->filter_flag == FILTER_FLAG_POST_MORTEM)
+ return 0;
+
if (tm->filter_flag == FILTER_FLAG_INCLUDE)
{
while (h < e)