From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD8A3C388F7 for ; Fri, 13 Nov 2020 10:44:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56E8320678 for ; Fri, 13 Nov 2020 10:44:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aGFX+ff5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="OInFAVEb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56E8320678 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4IFOd31Dm1Febu4Z51YgPHLiG1hRiMNxcM88j0unG7g=; b=aGFX+ff5C6GO1GqcWsvg/5Dx+ v4D1HE5/4kekEWMrI943vtgwyEYELeW65dXJwRPHqsxMzvE24BuUcH8ViTJaD09gh60PcfFFvhakf dVVGHegS7brCSi4w7yLC8LZuMY3+ptXGXseKXoES+JabM+poGQQu2OLodzXDQiQhl0yh5zR5UVbOo tIvasTxvoGlDUUGuyTUcM6/qcg3J3mayy6dN5KZ4H+rsylxmqtdtAe7MnOFcRpErDqAWCDnulqPDR TbMTF76gV2uYw1GH59H6KX3vj4BSKV/7MrEK19tk8cA/teEORnFZNzZmd/YlvB/b5upixVmEsVU+k V+jZIVS+w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdWXj-0003pC-QS; Fri, 13 Nov 2020 10:42:59 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdWXg-0003o8-OB for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 10:42:58 +0000 Received: by mail-pf1-x444.google.com with SMTP id v12so7264693pfm.13 for ; Fri, 13 Nov 2020 02:42:54 -0800 (PST) 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:user-agent; bh=zotiMlI26R0b5HC4rk/4XIicXmKOd5iokzlfD3CeyE8=; b=OInFAVEbQmKIxm6i8QSF1WnHxe091cE1dLxUY02QoXYMLomdzvYBbHsl0OcwoqeQcC zXiPTgXC7f0jhl395NKvSK9sCeX5Fj3NxnJ5YQfKyIn6nCkBzJ6Q7jpEQrQTpeJzl04k Xhu5f3efds6xyFNTD0r6ms2ug7XJ+Mc+YoNBOC5A7F38QXUhiY9O9sHXZ0uvqsyMHfA2 V2mjZXbdHVYwIULtbV/JoHleDM1wNt6u+0QwgzjW/k7F6pTpLF0b6GeOdVemZiv2fmah fTU+94s7+teOa7Ky9oul8itXBQJavqyv1Tru7EI+ILDW8eyPM3A/cQSHuGdptYu+M/kc uLqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zotiMlI26R0b5HC4rk/4XIicXmKOd5iokzlfD3CeyE8=; b=QlOl/NjMZ2yJFIbGKZKPNPS/46atPx72L2Bh20vS5iGkX1quAC2pGiI1cVTagsSm23 qnONiTvqoXQRvvSdRUdsxh4qpEDM1sAk9JwYVYar3Oe3j+TDxV34o4zix55J48onvk4J ma7Ewu4yL2Sf3NStAtuvjmwKA7utL0Q8ppxI7zD87GjzfezcuydT9Yj2Z1FLOHtcL5OA wPYXndHXmT8vWhXJsj9CkxwTkPnFEGM+3QTwN8/bX7I+DWypsDnNHPt+p/AXSWqs1Tn8 KFM3+RS76XOYJCkwy802lNDPFcpZwmopfK8epzGLEizbaFjCtq0Zgm8+9QmuNLfOsOzJ syyA== X-Gm-Message-State: AOAM533wdbQ2H7pK1OiY4m7TuJidGe79g7pSmtWNctNQx+v5KSe2PR6d 1ZNLF1URxgx7HFe3DciVBwQnUQ== X-Google-Smtp-Source: ABdhPJyHe+JwEhQNqMyi9I5/WXsKbxQefSKM39dK9eu1BSg1OZrb8Xj27g4BMzpdcE91bfqtUrbmyw== X-Received: by 2002:a17:90b:338d:: with SMTP id ke13mr2249488pjb.89.1605264172398; Fri, 13 Nov 2020 02:42:52 -0800 (PST) Received: from leoy-ThinkPad-X240s ([103.127.239.100]) by smtp.gmail.com with ESMTPSA id a28sm9482314pfk.50.2020.11.13.02.42.50 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Nov 2020 02:42:51 -0800 (PST) Date: Fri, 13 Nov 2020 18:42:48 +0800 From: Leo Yan To: Suzuki K Poulose Subject: Re: [PATCH 3/3] rfc: perf: cs_etm: Detect pid in VMID for kernel running at EL2 Message-ID: <20201113104248.GA1730@leoy-ThinkPad-X240s> References: <20201110183313.1823760-1-suzuki.poulose@arm.com> <20201110183313.1823760-4-suzuki.poulose@arm.com> <20201113001105.GA22708@leoy-ThinkPad-X240s> <7e45fd42-0869-cd4f-1eaf-5d48e4464482@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7e45fd42-0869-cd4f-1eaf-5d48e4464482@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201113_054257_095700_C437EAD6 X-CRM114-Status: GOOD ( 21.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Al Grant , "mathieu.poirier@linaro.org" , Anshuman Khandual , "coresight@lists.linaro.org" , "linux-arm-kernel@lists.infradead.org" , "mike.leach@linaro.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 13, 2020 at 09:47:42AM +0000, Suzuki Kuruppassery Poulose wrote: [...] > > Rather than heuristic method, I think we can use metadata to store > > "pid" entry in the function cs_etm_get_metadata(), so that in the > > record phase, the "pid" is stored into perf data file. > > True, that is a good idea. That makes it future proof. > > > > > When decode the trace data, we can retrieve "pid" value from the > > metadata, and can base on the "pid" value to make decision for using > > context_id or VMID. > > > > > The metadata can be accessed by referring > > cs_etm_queue::cs_etm_auxtrace::metadata; but the file > > util/cs-etm-decoder/cs-etm-decoder.c cannot directly access the > > metadata structure due to "cs_etm_queue" and "cs_etm_auxtrace" both > > are defined in util/cs-etm.c. It's better to introduce a helper > > function in util/cs-etm.c to retrieve "pid" value, like: > > > > u64 cs_etm__etmq_get_pid_type(struct cs_etm_queue *etmq); > > I am not an expert in that side, how it interacts with the OpenCSD. > thus left this patch as an RFC. > > I appreciate your feedback and thoughts. If you feel like you could > cleanup and implement this, please feel free to do so. Otherwise, I > might try it out whenever I have some spare cycles to understand > this side of the code (and this might be delayed). You are welcome! Sure, I will try to work out a change and share back. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel