Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp39758imn; Wed, 3 Aug 2022 18:40:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR6jHCZm2+GdsiTPd/KM7bPX7Yl0zfjnYLORlNDYqglyie7nFbNatGTeA9rw94RFXeCOsB/K X-Received: by 2002:a63:e751:0:b0:41b:b3a6:c00a with SMTP id j17-20020a63e751000000b0041bb3a6c00amr20084287pgk.492.1659577257482; Wed, 03 Aug 2022 18:40:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659577257; cv=none; d=google.com; s=arc-20160816; b=AkXbN0tFMdGcB54kkfXIm9k3EfHxOxGvHXq7Ml+1cWYS7Ypi1xpPJC1QY5/F0hpi3o nyt/r+uGavxy2p2DF0AFk71K3cQr1IOJhE6NmqKTuAHTHTjjf7JTqVtey8nqxOENBYWE wED32YQ+vWHLLBGZPTmDEA4FoQRlFiukVjZipxu48F5+jPbAKbGAVhKeKLc/PlUZ+SGS KqcJs0XWesK1Sa32oMSP7T3aIG5TAnhr7knqXiQukrdL2BWcupovRaK5Y2kABSn1J3MU IL93bcmtwrjlLWWuMhKtWcqpMQuGZouFn4WCnzqaI56d+1Szaec1gpjPTwYEjWyrg5s+ N2+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=erOSKwHABTyiioF2PC9EHt0JfAPJh4hwf/4PvpBCnV8=; b=mlWKJ2al3FFPZpRfXouWkR34Sr1wll1oPzDycnEgjY7RtVaRL0kI7B8Ja/YVs1R97z cvY+Df5HqeeiXRnjKMzDmil4ZmEgmtgdQfWYHicrQ/pr7q+ZDrZNyRFHmxgErtjEcjt4 UmVa9+d+0WYtBIrXzJGJMifyA/oLJkKE/PIMbjgSi8NI1weGt+M/lIas4WpeTzt6T09I JJgz0/2YzvF61Nn4+mArDBqFaKA4xixZWVKW8vWGsAZfjPMqtDqx5z0L2XfW7oMwHHNT HFrJdgsCVVQSa2gr7eOwN9fLNWV81lDp+wRNRVJMa1scPdNGPus9mfs4VinTADW4JLHb Eplw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WwVlD25u; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k9-20020a63ba09000000b0041beb516277si13264029pgf.828.2022.08.03.18.40.43; Wed, 03 Aug 2022 18:40:57 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=WwVlD25u; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238912AbiHDBHq (ORCPT + 99 others); Wed, 3 Aug 2022 21:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238933AbiHDBHm (ORCPT ); Wed, 3 Aug 2022 21:07:42 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7FBA3D5A5 for ; Wed, 3 Aug 2022 18:07:39 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id a8so4624682pjg.5 for ; Wed, 03 Aug 2022 18:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=erOSKwHABTyiioF2PC9EHt0JfAPJh4hwf/4PvpBCnV8=; b=WwVlD25us3ZEA2uO3DeVBjKN1KSKnyonbDDgu4aVy7IfH2TgSutPMDrSSjUKdJNSGF H9KGYX8D90rPA/KRzn/Br6rRUIPxpozMiHOgEsjSfCPriQ/Qh6u4bYstQMbAuJTOSvbd V0tuHCm7yg9muriJALX13iG+3VzYoW0HAmYQaFtOsD6ni3MrpiQUbKmOsLnczyx1VZmL SBXuF3R4U0upMs+Fcw/vonADPk4cb86xQJUJ1cW7RAKnImCzrtuP8JSTD/UUYDdkd/Q8 Qk/d1V9h4O6i3FviBtm1qq+qgkp8X2uK5mxpjKNuiLn2CKgr2RxUOzFy9DWbklSGcljU 8MIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=erOSKwHABTyiioF2PC9EHt0JfAPJh4hwf/4PvpBCnV8=; b=zc7BSbSpdWfLvD/J+qVRpUtOSZ6DxbJDmEOjAANpqfONN0Go0LPBIG1g+8jd/vaisV +jcLoYJcKQoZz/JNqU73nrgTKgBaRHlR5TQ+vvU/PFmz+88GHe8e86jhzx0T9ZGakhZv SyQq2+SE6HZ1/0jLysRz2k3GLvSiuPQvZmXItXmJVCCaVCRygIDdW+6jx92LaVRG3emf LF8aHGSZiQZVj5Yyrf3jtN0+GZtakurUfQs5lO2KSojqHwWlAEmz8i/2M3HRpphq+437 ojPylpXDFsY8xSyS0c2M3OgjkHHBH/VWBJhtdA+GtWg84puhXbt8B4DqyS2Ppnw8N7aB NmOw== X-Gm-Message-State: ACgBeo2JAciYxtQoRycdLt6ZxF8MHzVLLu0k3qyOFHzkLe6ogr1YNv61 Ny8+eAR/NNVxIh5fqK0VgmX3tEpoPGFuuuMt8YA= X-Received: by 2002:a17:902:e88c:b0:16d:4364:2c37 with SMTP id w12-20020a170902e88c00b0016d43642c37mr28431154plg.69.1659575259192; Wed, 03 Aug 2022 18:07:39 -0700 (PDT) Received: from leoy-ThinkPad-X240s (173.242.113.38.16clouds.com. [173.242.113.38]) by smtp.gmail.com with ESMTPSA id o19-20020a635d53000000b00411bbcdfbf7sm11684467pgm.87.2022.08.03.18.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 18:07:38 -0700 (PDT) Date: Thu, 4 Aug 2022 09:07:34 +0800 From: Leo Yan To: Ian Rogers Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH v1] perf test: Introduce script for data symbol parsing Message-ID: <20220804010734.GB133193@leoy-ThinkPad-X240s> References: <20220803150744.133128-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Hi Ian, On Wed, Aug 03, 2022 at 04:06:04PM -0700, Ian Rogers wrote: [...] > > +echo "Compiling test program..." > > +cc $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1 > > + > > +echo "Recording workload..." > > +perf mem record --all-user -o ${PERF_DATA} -- $TEST_PROGRAM & > > +PERFPID=$! > > I wonder here you could do: > TESTPID=$(ps -o pid -h --ppid "$PERFPID") I tried this command and found "$TESTPID" is empty string. So the test command doesn't create child process. > > +sleep 1 > > + > > +kill $PERFPID > > +wait $PERFPID > > +# test program may leave an orphan process running the workload > > +killall $(basename $TEST_PROGRAM) > > And then here kill $TESTPID to avoid the killall which worries me a little. Yeah, I referred the code from another script test_arm_spe_fork.sh, this script doesn't fork new child process. So here I get over complexity, will drop "killall $(basename $TEST_PROGRAM)" in next version. Thanks a lot for reviewing! Leo