Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932488AbcCHPWS (ORCPT ); Tue, 8 Mar 2016 10:22:18 -0500 Received: from mx5-phx2.redhat.com ([209.132.183.37]:36318 "EHLO mx5-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067AbcCHPWL (ORCPT ); Tue, 8 Mar 2016 10:22:11 -0500 Date: Tue, 8 Mar 2016 10:22:07 -0500 (EST) From: Chunyu Hu Reply-To: Chunyu Hu To: Steven Rostedt Cc: liwan@redhat.com, linux-kernel@vger.kernel.org Message-ID: <618614723.26788676.1457450527276.JavaMail.zimbra@redhat.com> In-Reply-To: <20160308093317.241d55a9@gandalf.local.home> References: <1457444222-8654-1-git-send-email-chuhu@redhat.com> <20160308093317.241d55a9@gandalf.local.home> Subject: Re: [PATCH 1/2] tracing: make tracer_flags use the right set_flag callback MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.68.5.41] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF38 (Linux)/8.0.6_GA_5922) Thread-Topic: tracing: make tracer_flags use the right set_flag callback Thread-Index: Gh/NbxN8z5czr61EVPgtCl9kqtpY1A== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1479 Lines: 52 ----- Original Message ----- > From: "Steven Rostedt" > To: "Chunyu Hu" > Cc: liwan@redhat.com, linux-kernel@vger.kernel.org > Sent: Tuesday, March 8, 2016 10:33:17 PM > Subject: Re: [PATCH 1/2] tracing: make tracer_flags use the right set_flag callback > > On Tue, 8 Mar 2016 21:37:01 +0800 > Chunyu Hu wrote: > > > @@ -6373,7 +6384,6 @@ create_trace_option_files(struct trace_array *tr, > > struct tracer *tracer) > > struct tracer_flags *flags; > > struct tracer_opt *opts; > > int cnt; > > - int i; > > I'm guessing this was a mistake. Thanks for the quick review! This is an mistake, the change below should be after it. From my limited knowledge and observation, seems there is no tracer sharing the tracer_flag except the dummy_tracer flag. As in the patch that flag is not shared any more, so i also removed these check in the previous email. @@ -6390,15 +6400,6 @@ create_trace_option_files(struct trace_array *tr, struct tracer *tracer) if (!trace_ok_for_array(tracer, tr)) return; - for (i = 0; i < tr->nr_topts; i++) { - /* - * Check if these flags have already been added. - * Some tracers share flags. - */ - if (tr->topts[i].tracer->flags == tracer->flags) - return; - } - > -- Steve > > > > > if (!tracer) > > return; > -- Regards, Chunyu Hu