tools: fix alignment of cpu layout output
authorShannon Zhao <zhaoshenglong@huawei.com>
Wed, 18 Jun 2014 04:18:15 +0000 (12:18 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 18 Jun 2014 22:57:50 +0000 (00:57 +0200)
commitf1445721a98e6204a0e441a08d582cfe9e1843df
tree81db83e8ef9eceab11b6f126c2092909ea8c6d8c
parenteb6a0b950edbc95689a50283d44862400207518c
tools: fix alignment of cpu layout output

Bug: when "core id" is greater than 9, the cpu_layout.py output doesn't align.

        Socket 0        Socket 1
        ---------       ---------
Core 9  [4, 16]         [10, 22]

Core 10         [5, 17]         [11, 23]

Solution: adjust output format to align based on the maximum length of the "core id" and "processor"

        Socket 0        Socket 1
        --------        --------
Core 9  [4, 16]         [10, 22]

Core 10 [5, 17]         [11, 23]

Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
tools/cpu_layout.py