Re: [PATCH 1/3] perf tools: Move callchain help messages to callchain.h

From: Arnaldo Carvalho de Melo
Date: Fri Oct 23 2015 - 12:41:05 EST


Em Fri, Oct 23, 2015 at 11:27:15AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Oct 23, 2015 at 11:59:32AM +0200, Ingo Molnar escreveu:
> > Btw., another usability detail I noticed yesterday is that when I typed 'perf
> > report -h' I got so much output that I couldn't find the specific option I was
> > looking for, because there's no apparent ordering of the output:
> >
> > triton:~/tip> perf report -h 2>&1 | grep -e ' -[a-Z],'
> > -i, --input <file> input file name
> > -v, --verbose be more verbose (show symbol address, etc)
> > -D, --dump-raw-trace dump raw trace in ASCII
> SNIP:
> > -C, --cpu <cpu> list of cpus to profile
> > -I, --show-info Display extended information about perf.data file
> > -M, --disassembler-style <disassembler style>
> > -b, --branch-stack use branch records for per branch histogram filling
> >
> > Such (alphabetic) ordering would be easier to navigate:
> >
> > -b, --branch-stack use branch records for per branch histogram filling
> > -c, --comms <comm[,comm...]>
> > -C, --cpu <cpu> list of cpus to profile
>
> Try the patch below:
>

I fixed a case where long options could be NULL and implemented this
other patch based on another suggestion you made, which I'll have to fix
to check if opt->long_name is NULL ;-)