Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757595AbZLGOnM (ORCPT ); Mon, 7 Dec 2009 09:43:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756604AbZLGOnK (ORCPT ); Mon, 7 Dec 2009 09:43:10 -0500 Received: from mail-fx0-f213.google.com ([209.85.220.213]:54283 "EHLO mail-fx0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756588AbZLGOnJ convert rfc822-to-8bit (ORCPT ); Mon, 7 Dec 2009 09:43:09 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=dSV4zzBuumZKB26ZonFu8hZ9BaGufjp4cY4WpgjuoOmJw+lfjLHFCY5wLm5bTNQKWJ Foa6usVZviYxZKNbx5U2A1xsydwnA4caWm2IHR67V7QD0mUdLaKyeM/nPauVz3uHtaYb cJHbwHmvXeBiGRs+PbkTm+ff5VumAd0pSntIE= MIME-Version: 1.0 In-Reply-To: <4B1CB1B7.7080106@cn.fujitsu.com> References: <4B1CB14A.4080402@cn.fujitsu.com> <4B1CB1B7.7080106@cn.fujitsu.com> Date: Mon, 7 Dec 2009 15:43:15 +0100 Message-ID: Subject: Re: [PATCH 06/13] function-graph: Allow writing the same val to set_graph_function From: Frederic Weisbecker To: Li Zefan Cc: Ingo Molnar , Steven Rostedt , LKML Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1446 Lines: 44 2009/12/7 Li Zefan : > ?# echo 'do_open' > set_graph_function > ?# echo 'do_open' >> set_graph_function > ?bash: echo: write error: Invalid argument > > Make it valid to write the same value to set_graph_function, > which is consistent with set_ftrace_filter interface. > > Signed-off-by: Li Zefan Acked-by: Frederic Weisbecker > --- > ?kernel/trace/ftrace.c | ? ?5 ++--- > ?1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index ff8aecd..7968762 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -2552,10 +2552,9 @@ ftrace_set_func(unsigned long *array, int *idx, char *buffer) > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?exists = true; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?break; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > - ? ? ? ? ? ? ? ? ? ? ? if (!exists) { > + ? ? ? ? ? ? ? ? ? ? ? if (!exists) > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?array[(*idx)++] = rec->ip; > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? found = 1; > - ? ? ? ? ? ? ? ? ? ? ? } > + ? ? ? ? ? ? ? ? ? ? ? found = 1; > ? ? ? ? ? ? ? ?} > ? ? ? ?} while_for_each_ftrace_rec(); > > -- > 1.6.3 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/