@@ -79,10 +79,12 @@ def set_cpus(self, cpus):
79
79
self .titlelen = max (map (len , cpus )) + 1
80
80
81
81
def print_desc (self , desc , sample ):
82
- if desc and not self .args .no_desc :
82
+ if self .args .no_desc :
83
+ return
84
+ if desc :
83
85
print >> self .logf , "\t " + desc
84
- if desc and sample and not self . args . no_desc :
85
- print >> self .logf , "\t " + "Sampling events: " , sample
86
+ if sample :
87
+ print >> self .logf , "\t " + "Sampling events: " , sample
86
88
87
89
def print_timestamp (self , timestamp ):
88
90
if timestamp :
@@ -93,7 +95,7 @@ def print_timestamp(self, timestamp):
93
95
94
96
def print_header (self , area , hdr ):
95
97
hdr = "%-14s %s" % (area , hdr )
96
- self .logf .write ("%-*s " % (self .hdrlen , hdr + ":" ))
98
+ self .logf .write ("%-*s " % (self .hdrlen , ( hdr + ":" ) if hdr . strip () else " " ))
97
99
98
100
# timestamp Timestamp in interval mode
99
101
# title CPU
@@ -182,7 +184,7 @@ def flush(self):
182
184
for cpuname in cpunames :
183
185
if cpuname in node :
184
186
cpu = node [cpuname ]
185
- uval , desc , sample , remark , bn = cpu
187
+ uval , remark , desc , sample , bn = cpu
186
188
v = uval .format_value ()
187
189
if bn :
188
190
v += "*"
@@ -194,7 +196,7 @@ def flush(self):
194
196
write ("%*s " % (VALCOL_LEN , "" ))
195
197
if remark :
196
198
cval = combine_uval (vlist )
197
- vs = cval .format_uncertainty () + " " + cval .format_mux ()
199
+ vs = "+- " + cval .format_uncertainty () + " " + cval .format_mux ()
198
200
write (" %-*s %s" % (self .unitlen , remark , vs ))
199
201
write ("\n " )
200
202
self .print_desc (desc , sample )
0 commit comments