Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2938283rwj; Mon, 19 Dec 2022 10:40:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXuhZxnC0BFzOC2tjyiin3av9uzMRMgDIikOgINYbp5dnrYrY642CYmXHgBxR+A469VHTjCb X-Received: by 2002:a17:906:b312:b0:815:8942:dde with SMTP id n18-20020a170906b31200b0081589420ddemr7778552ejz.23.1671475213572; Mon, 19 Dec 2022 10:40:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671475213; cv=none; d=google.com; s=arc-20160816; b=Npw9oOok9bODQtf65D5ZOuA+WNemkObAQhE78vwFJZ4Un+PPQa5Xpa6lMGLq/QxDZW GWeDeP90KGmN3YSzJdyB9i3lf56IT7/Bnzk34kvwJO3LISWxJoJCOiGyRBRRgtzwlIes OgzLrFfDMtdqj9I/SuqCOiSv4lzwDMBanwHqXm2udrGY6be+2wld+gIevFYKeuLlzVrj 9QkWbnJ9M8M6BCxhH2DzidLi/UIWAmg6FZQNAbYopG0dImY2GiGwOj4mAM0SR6sCZ8xY Rvae3CCzU+hxaz9JZmzxf3yohM63er5vtUkqpODuzT/s2y0mqbgAqccARjlZYOewGyRO 8B1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=djEBiLM7coowqoORf44M1ZTuxwCSoZcf1oq6w0fDGvg=; b=t6Bv+estwSZhSo1wZ83R1ATIrJioct8YTiFsDIbghJ5dEHpOXpxUSBykJryXmjzAPo 55p1VQeWP4WMFPXDh18v3zBf8ZK06f/911tVCz6m1P8KQ18se3R2auMbro1PI+wtisOk fEO2qRGok/vcecja87wFIGqBuI6xggVIri31h/z93KEvSgeUFZiBwP7VVOF0NOOjGTKi GEq5WQp++a3AqurfvkVE78Z7nLv/VDCh4Bbj/6tijVioPpL3hBEfBOP+w+kTMYNQWuO5 HXY30YewmdF3EWsySNvYrHsJAFK2hKb2tFP0Dh+YBGOE36Ahyre1W1z937TzoX2nkwQa Jspg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a1709062e8500b007c0b44ec243si8249417eji.781.2022.12.19.10.39.56; Mon, 19 Dec 2022 10:40:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231959AbiLSSVO (ORCPT + 70 others); Mon, 19 Dec 2022 13:21:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231401AbiLSSVL (ORCPT ); Mon, 19 Dec 2022 13:21:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3F6F2DD8; Mon, 19 Dec 2022 10:21:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A1DA3B80ED7; Mon, 19 Dec 2022 18:21:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A31EC433EF; Mon, 19 Dec 2022 18:21:04 +0000 (UTC) Date: Mon, 19 Dec 2022 13:21:02 -0500 From: Steven Rostedt To: Zheng Yejian Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Andrew Morton , Ross Zwisler , Tom Zanussi Subject: Re: [PATCH] tracing: Add a way to filter function addresses to function names Message-ID: <20221219132102.0dc6b7b9@gandalf.local.home> In-Reply-To: <68fa6a9d-7a7f-00ba-e5a2-9b64f0aa7db3@huawei.com> References: <20221214125209.09d736dd@gandalf.local.home> <68fa6a9d-7a7f-00ba-e5a2-9b64f0aa7db3@huawei.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Dec 2022 10:38:50 +0800 Zheng Yejian wrote: > > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c > > index 33e0b4f8ebe6..db6e2f399440 100644 > > --- a/kernel/trace/trace_events.c > > +++ b/kernel/trace/trace_events.c > > @@ -2822,7 +2822,7 @@ static __init int setup_trace_triggers(char *str) > > if (!trigger) > > break; > > bootup_triggers[i].event = strsep(&trigger, "."); > > - bootup_triggers[i].trigger = strsep(&trigger, "."); > > + bootup_triggers[i].trigger = strsep(&trigger, ""); > > Would it be better to change to: > > bootup_triggers[i].trigger = trigger; > Sure, I'll make the update. > Because there is unnecessary loop if call strsep(s, "") :-) > strsep(s, ct) { > strpbrk(cs, ct) { > // when 'ct' is empty string, here will always return NULL > // after traversing string 'cs' I'm not sure what you mean about an extra loop. Thanks, -- Steve