aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-12-16 10:09:17 -0800
committerDamjan Marion <dmarion@me.com>2021-12-20 19:37:47 +0000
commita0024a66feda939e271bf30a5e6ea57851b03271 (patch)
treed898eca81e5ee6599b59ce871dbbce538c7165ab /src/svm
parent4ab6ad136b62add35598f3c354231701b7c14c65 (diff)
session: improve sh segment-manager cli
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5d669fcba609bcdb35103f57c45e0a270213d84a
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/fifo_segment.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 48d019c9aac..8795b46c86a 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -1536,22 +1536,15 @@ format_fifo_segment (u8 * s, va_list * args)
f64 usage;
fifo_segment_mem_status_t mem_st;
- indent = format_get_indent (s) + 2;
-
- if (fs == 0)
- {
- s = format (s, "%-20s%10s%15s%15s%15s%15s", "Name", "Type",
- "HeapSize (M)", "ActiveFifos", "FreeFifos", "Address");
- return s;
- }
+ indent = format_get_indent (s);
fifo_segment_info (fs, &address, &size);
active_fifos = fifo_segment_num_fifos (fs);
free_fifos = fifo_segment_num_free_fifos (fs);
- s = format (s, "%-20v%10U%15llu%15u%15u%15llx", ssvm_name (&fs->ssvm),
- format_fifo_segment_type, fs, size >> 20ULL, active_fifos,
- free_fifos, address);
+ s = format (s, "%U%v type: %U size: %U active fifos: %u", format_white_space,
+ 2, ssvm_name (&fs->ssvm), format_fifo_segment_type, fs,
+ format_memory_size, size, active_fifos);
if (!verbose)
return s;
@@ -1560,9 +1553,8 @@ format_fifo_segment (u8 * s, va_list * args)
free_chunks = fifo_segment_num_free_chunks (fs, ~0);
if (free_chunks)
- s =
- format (s, "\n\n%UFree/Allocated chunks by size:\n", format_white_space,
- indent + 2);
+ s = format (s, "\n\n%UFree/Allocated chunks by size:\n",
+ format_white_space, indent + 2);
else
s = format (s, "\n");