aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/unix/gdb_funcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/unix/gdb_funcs.c')
-rw-r--r--src/vnet/unix/gdb_funcs.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/vnet/unix/gdb_funcs.c b/src/vnet/unix/gdb_funcs.c
index ce8db3a8ae3..797cb0eb7d1 100644
--- a/src/vnet/unix/gdb_funcs.c
+++ b/src/vnet/unix/gdb_funcs.c
@@ -238,51 +238,51 @@ gdb_show_traces ()
/* Get active traces from pool. */
- /* *INDENT-OFF* */
- foreach_vlib_main (
- ({
- fmt = "------------------- Start of thread %d %s -------------------\n";
- s = format (s, fmt, index, vlib_worker_threads[index].name);
-
- tm = &this_vlib_main->trace_main;
-
- trace_apply_filter(this_vlib_main);
-
- traces = 0;
- pool_foreach (h, tm->trace_buffer_pool)
- {
- vec_add1 (traces, h[0]);
+ foreach_vlib_main ()
+ {
+ fmt = "------------------- Start of thread %d %s -------------------\n";
+ s = format (s, fmt, index, vlib_worker_threads[index].name);
+
+ tm = &this_vlib_main->trace_main;
+
+ trace_apply_filter (this_vlib_main);
+
+ traces = 0;
+ pool_foreach (h, tm->trace_buffer_pool)
+ {
+ vec_add1 (traces, h[0]);
+ }
+
+ if (vec_len (traces) == 0)
+ {
+ s = format (s, "No packets in trace buffer\n");
+ goto done;
+ }
+
+ /* Sort them by increasing time. */
+ vec_sort_with_function (traces, trace_cmp);
+
+ for (i = 0; i < vec_len (traces); i++)
+ {
+ if (i == max)
+ {
+ fformat (stderr,
+ "Limiting display to %d packets."
+ " To display more specify max.",
+ max);
+ goto done;
+ }
+
+ s = format (s, "Packet %d\n%U\n\n", i + 1, format_vlib_trace,
+ vlib_get_first_main (), traces[i]);
+ }
+
+ done:
+ vec_free (traces);
+
+ index++;
}
- if (vec_len (traces) == 0)
- {
- s = format (s, "No packets in trace buffer\n");
- goto done;
- }
-
- /* Sort them by increasing time. */
- vec_sort_with_function (traces, trace_cmp);
-
- for (i = 0; i < vec_len (traces); i++)
- {
- if (i == max)
- {
- fformat (stderr, "Limiting display to %d packets."
- " To display more specify max.", max);
- goto done;
- }
-
- s = format (s, "Packet %d\n%U\n\n", i + 1, format_vlib_trace,
- vlib_get_first_main (), traces[i]);
- }
-
- done:
- vec_free (traces);
-
- index++;
- }));
- /* *INDENT-ON* */
-
fformat (stderr, "%v", s);
vec_free (s);
}