summaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/trace.c17
-rw-r--r--vlib/vlib/trace.h3
2 files changed, 15 insertions, 5 deletions
diff --git a/vlib/vlib/trace.c b/vlib/vlib/trace.c
index d430460be32..86a04aa64d1 100644
--- a/vlib/vlib/trace.c
+++ b/vlib/vlib/trace.c
@@ -359,12 +359,18 @@ cli_add_trace_buffer (vlib_main_t * vm,
vlib_trace_main_t * tm;
vlib_trace_node_t * tn;
u32 node_index, add;
+ u8 verbose = 0;
- if (unformat (input, "%U %d", unformat_vlib_node, vm, &node_index, &add))
- ;
- else
- return clib_error_create ("expected NODE COUNT, got `%U'",
- format_unformat_error, input);
+ while (unformat_check_input(input) != (uword)UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (input, "%U %d", unformat_vlib_node, vm, &node_index, &add))
+ ;
+ else if (unformat (input, "verbose"))
+ verbose = 1;
+ else
+ return clib_error_create ("expected NODE COUNT, got `%U'",
+ format_unformat_error, input);
+ }
foreach_vlib_main (
({
@@ -372,6 +378,7 @@ cli_add_trace_buffer (vlib_main_t * vm,
tm = &this_vlib_main->trace_main;
tm->trace_active_hint = 1;
+ tm->verbose = verbose;
oldheap = clib_mem_set_heap (this_vlib_main->heap_base);
diff --git a/vlib/vlib/trace.h b/vlib/vlib/trace.h
index fe5d7377861..6e9ed495734 100644
--- a/vlib/vlib/trace.h
+++ b/vlib/vlib/trace.h
@@ -81,6 +81,9 @@ typedef struct {
/* Per node trace counts. */
vlib_trace_node_t * nodes;
+
+ /* verbosity */
+ int verbose;
} vlib_trace_main_t;
#endif /* included_vlib_trace_h */