From patchwork Wed Oct 28 13:48:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bailu Lin X-Patchwork-Id: 11862779 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 09AE5C55178 for ; Wed, 28 Oct 2020 13:49:42 +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 8316124727 for ; Wed, 28 Oct 2020 13:49:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vlO5PPYG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8316124727 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivo.com 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:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=tbpghdSCHUlkzV3tsl7nVItnAwsvH52prGgbndTFnjg=; b=vlO5PPYGZYdJWY0XXTix7fBgnH 26BqaW+f3I7oouWQBbV0DxHoUf6abJakYpuWn7EanELnZcSPzmHuRfx6y7ZL1lBHKAMHNeeidkOwk N278wnv+NxKy6dubKLv8Yzp75/qtjQiXXU8ZyPr9Z1uvYTGtTmKr1TMMJiKWOtzeu37nwJP6kTV9j Xqi9muLdQm5aCI3/jW8wz35gQ8ftQG56UY9bkZrADxcVan7dU8KznmkknrGgGhV+lNviBh5uokeI2 zqW/deKE736cQKfIH/+WopKcAnqpjNhNjAkiPLziv5adUXHo7IsYO379WEevlA2EWnCg7sQRm83n0 oG2Ichpw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXlp2-0005Bl-2m; Wed, 28 Oct 2020 13:49:04 +0000 Received: from mail-m1272.qiye.163.com ([115.236.127.2]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXlov-00059r-Nq for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2020 13:49:01 +0000 Received: from ubuntu.localdomain (unknown [58.250.176.229]) by mail-m1272.qiye.163.com (Hmail) with ESMTPA id EB3D0B02446; Wed, 28 Oct 2020 21:48:49 +0800 (CST) From: Bailu Lin To: Catalin Marinas , Will Deacon , Jonathan Corbet , Harry Wei , Alex Shi , Bailu Lin , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Documentation: Chinese translation of Documentation/arm64/perf.rst Date: Wed, 28 Oct 2020 06:48:24 -0700 Message-Id: <20201028134831.79592-1-bailu.lin@vivo.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZHh9PSx9MH0oaTU8fVkpNS0hDQklCSEtPTkJVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0hKTFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6ODI6Dyo6ET8eDS4CGE1RTzQW GkhPCjlVSlVKTUtIQ0JJQkhLQ0JLVTMWGhIXVRkaEhcOVRcSFTsNEg0UVRgUFkVZV1kSC1lBWU5D VUlOS1VKTE1VSUlCWVdZCAFZQU5OTkI3Bg++ X-HM-Tid: 0a756f77e6ed98b7kuuueb3d0b02446 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201028_094858_252303_A5A40E04 X-CRM114-Status: GOOD ( 12.15 ) 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: kernel@vivo.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a Chinese translated version of Documentation/arm64/perf.rst Signed-off-by: Bailu Lin --- Documentation/arm64/perf.rst | 2 + .../translations/zh_CN/arm64/index.rst | 1 + .../translations/zh_CN/arm64/perf.rst | 85 +++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 Documentation/translations/zh_CN/arm64/perf.rst diff --git a/Documentation/arm64/perf.rst b/Documentation/arm64/perf.rst index 9c76a97baf28..b567f177d385 100644 --- a/Documentation/arm64/perf.rst +++ b/Documentation/arm64/perf.rst @@ -1,5 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 +.. _perf_index: + ===================== Perf Event Attributes ===================== diff --git a/Documentation/translations/zh_CN/arm64/index.rst b/Documentation/translations/zh_CN/arm64/index.rst index e31a6090384d..f51fed166326 100644 --- a/Documentation/translations/zh_CN/arm64/index.rst +++ b/Documentation/translations/zh_CN/arm64/index.rst @@ -15,3 +15,4 @@ ARM64 架构 amu hugetlbpage + perf diff --git a/Documentation/translations/zh_CN/arm64/perf.rst b/Documentation/translations/zh_CN/arm64/perf.rst new file mode 100644 index 000000000000..be8269dd5d9a --- /dev/null +++ b/Documentation/translations/zh_CN/arm64/perf.rst @@ -0,0 +1,85 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_CN.rst + +:Original: :ref:`Documentation/arm64/perf.rst ` + +Translator: Bailu Lin + +============= +Perf 事件属性 +============= + +:作者: Andrew Murray +:日期: 2019-03-06 + +exclude_user +------------ + +该属性排除用户空间。 + +用户空间始终运行在 EL0,因此该属性将排除 EL0。 + + +exclude_kernel +-------------- + +该属性排除内核空间。 + +打开 VHE 时内核运行在 EL2,不打开 VHE 时内核运行在 EL1。客户端 +内核总是运行在 EL1。 + +对于主机端,该属性排除 EL1 和 VHE 上的 EL2。 + +对于客户端,该属性排除 EL1。请注意客户端从来不会运行在 EL2。 + + +exclude_hv +---------- + +该属性排除虚拟机监控器。 + +对于 VHE 主机端该属性将被忽略,因为此时主机端内核是虚拟机监控器。 + +对于 non-VHE 主机端该属性将排除 EL2,因为虚拟机监控器运行在 EL2 +的任何代码主要用于客户端和主机端的切换。 + +对于客户端该属性无效。请注意客户端从来不会运行在 EL2。 + + +exclude_host / exclude_guest +---------------------------- + +这些属性分别排除了 KVM 主机端和客户端。 + +KVM 主机端可能运行在 EL0(用户空间),EL1(non-VHE 内核)和 +EL2(VHE 内核 或 non-VHE 虚拟机监控器)。 + +KVM 客户端可能运行在 EL0(用户空间)和 EL1(内核)。 + +由于主机端和客户端之间重叠的异常级别,我们不能仅仅依靠 PMU 的硬件异 +常过滤机制-因此我们必须启用/禁用对于客户端进入和退出的计数。而这在 +VHE 和 non-VHE 系统上表现不同。 + +对于 non-VHE 系统的 exclude_host 属性排除 EL2 - 在进入和退出客户 +端时,我们会根据 exclude_host 和 exclude_guest 属性在适当的情况下 +禁用/启用该事件。 + +对于 VHE 系统的 exclude_guest 属性排除 EL1,而对其中的 exclude_host +属性同时排除 EL0,EL2。在进入和退出客户端时,我们会适当地根据 +exclude_host 和 exclude_guest 属性包括/排除 EL0。 + +以上声明也适用于在 not-VHE 客户端使用这些属性时,但是请注意客户端从 +来不会运行在 EL2。 + + +准确性 +------ + +在 non-VHE 主机端上,我们在 EL2 进入/退出主机端/客户端的切换时启用/ +关闭计数器 -但是在启用/禁用计数器和进入/退出客户端之间存在一段延时。 +对于 exclude_host, 我们可以通过过滤 EL2 消除在客户端进入/退出边界 +上用于计数客户端事件的主机端事件计数器。但是当使用 !exclude_hv 时, +在客户端进入/退出有一个小的暗窗口无法捕获到主机端的事件。 + +在VHE系统尚没有暗窗口。