From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161153AbcHEKcu (ORCPT ); Fri, 5 Aug 2016 06:32:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43644 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966612AbcHEKct (ORCPT ); Fri, 5 Aug 2016 06:32:49 -0400 Date: Fri, 5 Aug 2016 12:32:46 +0200 From: Jiri Olsa To: Mathieu Poirier Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V4 4/6] perf tools: pushing driver configuration down to the kernel Message-ID: <20160805103246.GC12528@krava> References: <1470329604-14356-1-git-send-email-mathieu.poirier@linaro.org> <1470329604-14356-5-git-send-email-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1470329604-14356-5-git-send-email-mathieu.poirier@linaro.org> User-Agent: Mutt/1.6.2 (2016-07-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 05 Aug 2016 10:32:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 04, 2016 at 10:53:22AM -0600, Mathieu Poirier wrote: SNIP > diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c > index 418ed94756d3..df74bdbb7524 100644 > --- a/tools/perf/builtin-top.c > +++ b/tools/perf/builtin-top.c > @@ -940,6 +940,10 @@ static int callchain_param__setup_sample_type(struct callchain_param *callchain) > > static int __cmd_top(struct perf_top *top) > { > + char msg[512]; > + struct perf_evsel *pos; > + struct perf_evsel_config_term *err_term; > + struct perf_evlist *evlist = top->evlist; > struct record_opts *opts = &top->record_opts; > pthread_t thread; > int ret; > @@ -976,6 +980,13 @@ static int __cmd_top(struct perf_top *top) > if (ret) > goto out_delete; > > + if (perf_evlist__apply_drv_configs(evlist, &pos, &err_term)) { > + error("failed to set config \"%s\" on event %s with %d (%s)\n", > + err_term->val.drv_cfg, perf_evsel__name(pos), errno, > + strerror_r(errno, msg, sizeof(msg))); hum ret is 0 in here.. > + goto out_delete; > + } thanks, jirka