On Thu, Jul 24, 2014 at 9:10 PM, Jiri Olsa <jo...@redhat.com> wrote: > On Wed, Jul 09, 2014 at 02:28:11PM +0900, Namhyung Kim wrote: >> Save column length in the hpp format and pass it to print functions. >> This is a preparation for users to control column width in the output. > > SNIP > >> + >> +void perf_hpp__reset_width(struct perf_hpp_fmt *fmt, struct hists *hists) >> +{ >> + int idx; >> + >> + if (perf_hpp__is_sort_entry(fmt)) >> + return perf_hpp__reset_sort_width(fmt, hists); >> + >> + for (idx = 0; idx < PERF_HPP__MAX_INDEX; idx++) { >> + if (fmt == &perf_hpp__format[idx]) >> + break; >> + } >> + >> + if (idx == PERF_HPP__MAX_INDEX) >> + return; >> + >> + switch (idx) { >> + case PERF_HPP__OVERHEAD: >> + case PERF_HPP__OVERHEAD_SYS: >> + case PERF_HPP__OVERHEAD_US: >> + case PERF_HPP__OVERHEAD_ACC: >> + fmt->len = 8; >> + break; >> + >> + case PERF_HPP__OVERHEAD_GUEST_SYS: >> + case PERF_HPP__OVERHEAD_GUEST_US: >> + fmt->len = 9; >> + break; > > just curious.. why is it 9 for guest %, while we use 8 for host? > I understand that was the current state
It's the strlen of header - "guest sys". :) Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/