Re: [PATCH] perf util: Join four conditions in two in perf_evlist__create_maps().

2013-11-27 Thread Dongsheng Yang
On 11/27/2013 05:49 AM, Adrian Hunter wrote: On 28/11/13 00:52, Dongsheng Yang wrote: On 11/27/2013 04:43 AM, Adrian Hunter wrote: On 28/11/13 00:23, Dongsheng Yang wrote: There are four condition branchs in perf_evlist__create_maps, but they only do two kinds of thing. 1st and 4th call cpu_ma

Re: [PATCH] perf util: Join four conditions in two in perf_evlist__create_maps().

2013-11-27 Thread Adrian Hunter
On 28/11/13 00:52, Dongsheng Yang wrote: > On 11/27/2013 04:43 AM, Adrian Hunter wrote: >> On 28/11/13 00:23, Dongsheng Yang wrote: >>> There are four condition branchs in perf_evlist__create_maps, but they >>> only do two kinds of thing. 1st and 4th call cpu_map__new(), and the others >>> call cpu

Re: [PATCH] perf util: Join four conditions in two in perf_evlist__create_maps().

2013-11-27 Thread Dongsheng Yang
On 11/27/2013 04:43 AM, Adrian Hunter wrote: On 28/11/13 00:23, Dongsheng Yang wrote: There are four condition branchs in perf_evlist__create_maps, but they only do two kinds of thing. 1st and 4th call cpu_map__new(), and the others call cpu_map__dummy_new(). This patch joins them in two branchs

Re: [PATCH] perf util: Join four conditions in two in perf_evlist__create_maps().

2013-11-27 Thread Adrian Hunter
On 28/11/13 00:23, Dongsheng Yang wrote: > There are four condition branchs in perf_evlist__create_maps, but they > only do two kinds of thing. 1st and 4th call cpu_map__new(), and the others > call cpu_map__dummy_new(). This patch joins them in two branchs, decreasing > the number of branch and re

[PATCH] perf util: Join four conditions in two in perf_evlist__create_maps().

2013-11-27 Thread Dongsheng Yang
There are four condition branchs in perf_evlist__create_maps, but they only do two kinds of thing. 1st and 4th call cpu_map__new(), and the others call cpu_map__dummy_new(). This patch joins them in two branchs, decreasing the number of branch and removing some duplicated code. Signed-off-by: Dong