Skip to content

Commit

Permalink
lstopo/draw: improve the removal of space between boxes for PUs
Browse files Browse the repository at this point in the history
Don't propagate this removal to memory children
(if we ever have an object with PU normal children and multiple NUMA nodes,
 e.g. lstopo -i "pack:1 [numa] [numa] pu:4").

This further improves commit 200a7b7
but brings back the vertical space between PUs and a parent cache.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Feb 19, 2019
1 parent a2e4e72 commit efb0bdb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/lstopo/lstopo-draw.c
Expand Up @@ -487,6 +487,7 @@ place_children(struct lstopo_output *loutput, hwloc_obj_t parent,
enum lstopo_orient_e orient = loutput->force_orient[parent->type];
unsigned border = loutput->gridsize;
unsigned separator = loutput->gridsize;
unsigned normal_children_separator = separator;
unsigned totwidth = plud->width, totheight = plud->height;
unsigned children_width = 0, children_height = 0;
unsigned above_children_width, above_children_height;
Expand Down Expand Up @@ -524,11 +525,11 @@ place_children(struct lstopo_output *loutput, hwloc_obj_t parent,

/* no separator between PUs */
if ((unsigned)parent->depth == loutput->depth-2)
separator = 0;
normal_children_separator = 0;

/* place non-memory children */
if (parent->arity + parent->io_arity + parent->misc_arity)
place__children(loutput, parent, plud->children.kinds, &orient, 0, separator, &children_width, &children_height);
place__children(loutput, parent, plud->children.kinds, &orient, 0, normal_children_separator, &children_width, &children_height);

/* place memory children */
if (plud->above_children.kinds) {
Expand Down

0 comments on commit efb0bdb

Please sign in to comment.