Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3422774rwj; Mon, 19 Dec 2022 18:39:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXuqZlR4Nw5g9zEByjhp1A7b7H22axLukPeRtK+sLgpjdG9ujsh63p0UPoNX9kYhZYEuynXv X-Received: by 2002:a05:6a20:b829:b0:ae:7f1d:1912 with SMTP id fi41-20020a056a20b82900b000ae7f1d1912mr11204266pzb.38.1671503960865; Mon, 19 Dec 2022 18:39:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671503960; cv=none; d=google.com; s=arc-20160816; b=aJPIFuqPSELTg5UCX6pmA4wl103U/RM9jQmlE06ekBXp1YlhZZerqS6ez+dIZhL+AF rOrhJS/hxnYh+406SRXn8fV2S5qIDeHkYz1X9DA9fczGnkL2UUXJ62xdrS1aO8EfmUh+ jIFWJAxrlPzbdMzeKw2VznwrQvj7lBeqZ2H8S3YrVekokYPOaxWHGscqEkxcpRg8xjzC j1T7lOEs/yMUwC9Hv6/svdUP7EJSou1uEqKvCEuAly+4IgDBOT3Dh7m6fzLhxJiYKrjY QZYUmeeCc1snV114g1L5IHIQPob5p5g76XHCTLMP7p8Y/NZ5mJEFRbo8EwqBHstOw94F epYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=euaufjnDK+fvU+YSfaGRJN1H60iEczIhdLdEL0i6OUQ=; b=mUg6ZfuxVo1oa68g60sJLRsDphKCkhTezKYDGpzc2q6gHMtumF4PYZv7f82mg7nVYr NP6+N7WGnGfND2J1+NkfV0xcaDkT2q3L5hNiuqc3Mh3eUfyGFPP0wG1bpKgNWM5p5omz K1TuQZK8bT1Uouq5RmMF8wVz67+a7v64zyAJ8Pw/dzIDkQcqxY2qnxEOUGnB6QdH6Eoc PHdXC42ceAYAUecrJ3f2oZRg3MiYRh8I9jYTXzVQ6tMJWvAyM0L8B/8lNiHscLJfQxy3 9J7zeD04NGjzCtUgJmrfXosxFPFHTB+G01y3ZYRO/o7NF1cPrcENEE4ib1UV2uhxyRm7 HOUA== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a633606000000b0047844657797si13507558pga.115.2022.12.19.18.39.11; Mon, 19 Dec 2022 18:39:20 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233137AbiLTBrJ (ORCPT + 70 others); Mon, 19 Dec 2022 20:47:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232762AbiLTBqj (ORCPT ); Mon, 19 Dec 2022 20:46:39 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E01F12AEA; Mon, 19 Dec 2022 17:40:08 -0800 (PST) Received: from dggpeml100012.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NbfPH67TJzmWgw; Tue, 20 Dec 2022 09:38:59 +0800 (CST) Received: from [10.67.110.218] (10.67.110.218) by dggpeml100012.china.huawei.com (7.185.36.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 20 Dec 2022 09:40:05 +0800 Message-ID: Date: Tue, 20 Dec 2022 09:40:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] tracing: Add a way to filter function addresses to function names Content-Language: en-US To: Steven Rostedt CC: LKML , Linux Trace Kernel , Masami Hiramatsu , Andrew Morton , Ross Zwisler , Tom Zanussi References: <20221214125209.09d736dd@gandalf.local.home> <68fa6a9d-7a7f-00ba-e5a2-9b64f0aa7db3@huawei.com> <20221219132102.0dc6b7b9@gandalf.local.home> From: Zheng Yejian In-Reply-To: <20221219132102.0dc6b7b9@gandalf.local.home> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.110.218] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml100012.china.huawei.com (7.185.36.121) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 2022/12/20 02:21, Steven Rostedt wrote: > 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. I just mean above "traversing string 'cs'" in strpbrk(s, "") is unnecessary. Sorry for making the ambiguity :-( > > Thanks, > > -- Steve >