Skip to content

Commit 290a313

Browse files
committed
lstopo/text: show topo info attrs in verbose mode
Signed-off-by: Brice Goglin <[email protected]>
1 parent 36143a1 commit 290a313

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

utils/lstopo/lstopo-text.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ output_console(struct lstopo_output *loutput, const char *filename)
529529
hwloc_const_bitmap_t complete = hwloc_topology_get_complete_cpuset(topology);
530530
hwloc_const_bitmap_t topo = hwloc_topology_get_topology_cpuset(topology);
531531
hwloc_const_bitmap_t allowed = hwloc_topology_get_allowed_cpuset(topology);
532+
struct hwloc_infos_s *infos = hwloc_topology_get_infos(topology);
532533

533534
if (!hwloc_bitmap_isequal(topo, complete)) {
534535
hwloc_bitmap_t unknown = hwloc_bitmap_alloc();
@@ -550,6 +551,19 @@ output_console(struct lstopo_output *loutput, const char *filename)
550551
free(disallowedstr);
551552
hwloc_bitmap_free(disallowed);
552553
}
554+
if (infos->count) {
555+
unsigned i;
556+
fprintf(output, "Topology infos:");
557+
for(i=0; i<infos->count; i++) {
558+
const char *quote;
559+
if (strchr(infos->array[i].value, ' '))
560+
quote = "\"";
561+
else
562+
quote = "";
563+
fprintf(output, " %s=%s%s%s", infos->array[i].name, quote, infos->array[i].value, quote);
564+
}
565+
fprintf(output, "\n");
566+
}
553567
if (!hwloc_topology_is_thissystem(topology))
554568
fprintf (output, "Topology not from this system\n");
555569
}

0 commit comments

Comments
 (0)