From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754151Ab3BDLTR (ORCPT ); Mon, 4 Feb 2013 06:19:17 -0500 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:55121 "EHLO e23smtp08.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752962Ab3BDLTQ (ORCPT ); Mon, 4 Feb 2013 06:19:16 -0500 Date: Mon, 4 Feb 2013 16:47:11 +0530 From: Srikar Dronamraju To: Oleg Nesterov Cc: Ingo Molnar , Steven Rostedt , Anton Arapov , Frank Eigler , Josh Stone , Masami Hiramatsu , "Suzuki K. Poulose" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6] uprobes/perf: Always increment trace_uprobe->nhit Message-ID: <20130204111711.GB12900@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20130131191752.GA30410@redhat.com> <20130131191832.GA30457@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20130131191832.GA30457@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13020411-5140-0000-0000-000002B66CA5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Oleg Nesterov [2013-01-31 20:18:32]: > Move tu->nhit++ from uprobe_trace_func() to uprobe_dispatcher(). > > ->nhit counts how many time we hit the breakpoint inserted by this > uprobe, we do not want to loose this info if uprobe was enabled by > sys_perf_event_open(). > Though I dont see a problem with this change, It seems unnecessary for me. Info from nhits is mostly for /sys/kernel/debug/tracing/uprobe_profile I am not sure how sys_perf_event_open() is making use of this? > Signed-off-by: Oleg Nesterov > --- > kernel/trace/trace_uprobe.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c > index 55cdc14..0a9a8de 100644 > --- a/kernel/trace/trace_uprobe.c > +++ b/kernel/trace/trace_uprobe.c > @@ -473,8 +473,6 @@ static void uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs) > unsigned long irq_flags; > struct ftrace_event_call *call = &tu->call; > > - tu->nhit++; > - > local_save_flags(irq_flags); > pc = preempt_count(); > > @@ -698,6 +696,7 @@ static int uprobe_dispatcher(struct uprobe_consumer *con, struct pt_regs *regs) > struct trace_uprobe *tu; > > tu = container_of(con, struct trace_uprobe, consumer); > + tu->nhit++; > > if (tu->flags & TP_FLAG_TRACE) > uprobe_trace_func(tu, regs); > -- > 1.5.5.1 > -- Thanks and Regards Srikar Dronamraju