From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756098AbbDVKyW (ORCPT ); Wed, 22 Apr 2015 06:54:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49890 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752142AbbDVKyU (ORCPT ); Wed, 22 Apr 2015 06:54:20 -0400 Date: Wed, 22 Apr 2015 12:54:09 +0200 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML , David Ahern Subject: Re: [PATCH 08/10] perf hists browser: Split popup menu actions - part 2 Message-ID: <20150422105409.GA27697@krava.redhat.com> References: <1429687101-4360-1-git-send-email-namhyung@kernel.org> <1429687101-4360-9-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429687101-4360-9-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2015 at 04:18:19PM +0900, Namhyung Kim wrote: SNIP > script_browse(script_opt); > @@ -1505,17 +1585,74 @@ do_run_script(struct hist_browser *browser __maybe_unused, > } > > static int > -do_switch_data(struct hist_browser *browser __maybe_unused, int key) > +add_script_opt(struct hist_browser *browser __maybe_unused, > + struct popup_action *act, char **optstr, > + struct thread *thread, struct symbol *sym) > +{ > + if (thread) { > + if (asprintf(optstr, "Run scripts for samples of thread [%s]", > + thread__comm_str(thread)) < 0) > + return 0; > + } else if (sym) { .............. && sym->namelen ;-) but I think you're right, let's see if there's (sym && !sym->namelen) case, and fix it at the proper place.. not here jirka