From patchwork Mon Oct 21 13:37:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177080 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3434295ill; Mon, 21 Oct 2019 06:38:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkVstxC3GlbkHF3ok+f+o4HepI4VqdbjptI1o05nk9Z9u2EOqwC3Ya5bBSK258QGJVIWd5 X-Received: by 2002:a17:906:90d8:: with SMTP id v24mr22541541ejw.60.1571665137997; Mon, 21 Oct 2019 06:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665137; cv=none; d=google.com; s=arc-20160816; b=D0ORkDxrwcqdaX/4D7AcE7cnoe34BkmLGyT4gWmBVY5isIwHfOr6r/J35UflMf9u1X RwuEgXBwQRN9GlxTeQ+ROIawxT7rprXg/xrtx/bdyixYhIir4yUpwgh1DWE0KIcLqIhz Ept7qtcmDfXyuzfVWvr2Xmc3Cef9O03zcaek2Z+DINgdejSbNy37r146DOvsQqCFOeGd Xmc6OrTHq682ljV70zT4EVdDRAt6H0vy0J8lna450+Ly1ZglsdMqU/IQj8216ZHg4YpP gfM+ZY1AS77wH3UzTqHGGZ0Oxqxz0PYiOcjzEyFBWq7WKDXnpRswsqHkxq08PmDPQ/Je ECNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QYFE67C9qiheb6thVNwTdQvpdfH8l60afL6BFbwK3BY=; b=Z8ZWuF9osUIfbMfSnbGVTXJeBoSi4ge9/e8Vdu1VE3jJu+yES86f9pvFZHzO98osly o7QasXTOa5OlV1fHjdl/ChZ2d79TTa6mqOe3ldkwVrOoKAmsn5RauuOqsBarAq9HD43f XNFLuaqfrrhsqIvVZxDydEYLIkcAmFHwnhtPStr2HnR/hb0UpCNJeSFDtbF1+4wPe/En oKVdswiyJqydFmHsYgQnvujry3Jttl7mP+/D07Pi8FxWOT0bllVyx/FIyvBnf2tbxmNw s2GjFcuYPkcLsPgQxC8/00b6j+H2JaEIx5G4CWt78QcQ95qWwZzotk44RmxGh6klMCIy Wc1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S7dKCUkY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23si3047110ejf.390.2019.10.21.06.38.57; Mon, 21 Oct 2019 06:38:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S7dKCUkY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729107AbfJUNi4 (ORCPT + 26 others); Mon, 21 Oct 2019 09:38:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:40370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728872AbfJUNiz (ORCPT ); Mon, 21 Oct 2019 09:38:55 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3814F21906; Mon, 21 Oct 2019 13:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665134; bh=xm5LPEbt5KjBMbDJZbY6I0KLMlnaVCcymuiJLkWPo0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S7dKCUkYl9VDCduHjv1YlOiNJXu3EggJFudSBCw1iUssbiy2JBjRN8hKkVAE76zDB fa7g7iw16OQadbf8imJTX/2qIa423AmOlT/woVhDdaEek8VGw+FyvdwBIjZfao2OL/ CTBFy77ijeY7cOAA9ir+2o9hKouZ1YhUMoFwJLa8= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Alexander Shishkin , Jiri Olsa , Mark Rutland , Arnaldo Carvalho de Melo Subject: [PATCH 04/57] perf test: Report failure for mmap events Date: Mon, 21 Oct 2019 10:37:41 -0300 Message-Id: <20191021133834.25998-5-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan When fail to mmap events in task exit case, it misses to set 'err' to -1; thus the testing will not report failure for it. This patch sets 'err' to -1 when fails to mmap events, thus Perf tool can report correct result. Fixes: d723a55096b8 ("perf test: Add test case for checking number of EXIT events") Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191011091942.29841-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/task-exit.c | 1 + 1 file changed, 1 insertion(+) -- 2.21.0 diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 4965f8b9055b..19fa7cb429fd 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -111,6 +111,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused if (evlist__mmap(evlist, 128) < 0) { pr_debug("failed to mmap events: %d (%s)\n", errno, str_error_r(errno, sbuf, sizeof(sbuf))); + err = -1; goto out_delete_evlist; } From patchwork Mon Oct 21 13:37:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177081 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3434369ill; Mon, 21 Oct 2019 06:39:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/82ANSqiDJ6g9r3ynZMBI7N72fP4bPhfjU8ssTXmcOlE0XO/VSuJPe+9HUG7tb+DNs+Xq X-Received: by 2002:aa7:cfcd:: with SMTP id r13mr25503068edy.146.1571665142045; Mon, 21 Oct 2019 06:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665142; cv=none; d=google.com; s=arc-20160816; b=RVqhM+gPJOf+VkYjQifeF5v/LuekGdGxiABatwpWs33MTee0xicFkS2I6tXcoeOiqY 2ziK24fW3se5UiOlLhSt3NJu8MAimH5cOMAibcEYPpQQi3/5Xt5rYl7E9Spto0fxeoRS qKVrYW7JGNKeiqAIUefWuDROn3RXUlrzR2ipYXAy5wZ3sDBhRhLUOXLoDc6h1nQHmX29 AQ3i9VNvUBjdxbWrg/Gsfomwyb30mH05CJz03xq1TUn0p4y0U3yJ0ZsFqCnPgNUYYv4K LcTFJpWHKx6VcmBuFwgcua52sK59jlTl7lgmh8aUfQtRF1yMCEokKMS0urzpNOkqsfFn oivQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qr/bvplJ30C7wNumFuWQe06HetcMf2BinGY14xwqtTM=; b=AZ9s7kbQcY30P3/sybLwVuV5kuemIwvf+FsTKLKwJeZKPuo7lRYNDC40qMzNtyMBgH BDR6zG3Az21zNF0011K/2/BlEe/TidnwZCy1T62qf9kACijmkcYjIrBhtgyB4I5v8T7t SNDISrCCAreBBNs5prQA3b60H+BoDkmHPCv44iwF5C04n+rAUIk11lk6U1YwAe15mskr wkm8JZCnydOY0TzfPWoQxN43wKN4bQdkHDoO4CfDEgNMtbSN/iPdAzo0uBELm70yE7Qr o9KN9eFEeMTAVmSMiSPvoOlalWZLQkfWsGO5gYsDW1rXpR2GqvB6R8EG1u7kPjZ8Vgj8 cO9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=M3L5YYbl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8si8708337ejt.219.2019.10.21.06.39.01; Mon, 21 Oct 2019 06:39:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=M3L5YYbl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729124AbfJUNi7 (ORCPT + 26 others); Mon, 21 Oct 2019 09:38:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:40400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728872AbfJUNi6 (ORCPT ); Mon, 21 Oct 2019 09:38:58 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2D73A21928; Mon, 21 Oct 2019 13:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665137; bh=0ZXePMfFtOMKmPrnY+D4JgmIn+h6ZV2J/BeW8xctlsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M3L5YYblANRmu3AVttvHd9DpJbb2DmUjoYqMWlIvL1dJogsdbjMtk64qbgErFuHRT QtoJ7xTCbIRI+h4RBY4te34qJkfEu+hA+rzlFJCw1CBQ85/4fgnUSCo3hNGNbhrNHN VSpwc1Y4oMKTFsVaxNf8Rx1vh5pItajVU8T0Tsy8= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Alexander Shishkin , Jiri Olsa , Mark Rutland , Arnaldo Carvalho de Melo Subject: [PATCH 05/57] perf test: Avoid infinite loop for task exit case Date: Mon, 21 Oct 2019 10:37:42 -0300 Message-Id: <20191021133834.25998-6-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan When executing the task exit testing case, perf gets stuck in an endless loop this case and doesn't return back on Arm64 Juno board. After digging into this issue, since Juno board has Arm's big.LITTLE CPUs, thus the PMUs are not compatible between the big CPUs and little CPUs. This leads to a PMU event that cannot be enabled properly when the traced task is migrated from one variant's CPU to another variant. Finally, the test case runs into infinite loop for cannot read out any event data after return from polling. Eventually, we need to work out formal solution to allow PMU events can be freely migrated from one CPU variant to another, but this is a difficult task and a different topic. This patch tries to fix the Perf test case to avoid infinite loop, when the testing detects 1000 times retrying for reading empty events, it will directly bail out and return failure. This allows the Perf tool can continue its other test cases. Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191011091942.29841-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/task-exit.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.21.0 diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 19fa7cb429fd..adaff9044331 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -54,6 +54,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused struct perf_cpu_map *cpus; struct perf_thread_map *threads; struct mmap *md; + int retry_count = 0; signal(SIGCHLD, sig_handler); @@ -133,6 +134,13 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused out_init: if (!exited || !nr_exit) { evlist__poll(evlist, -1); + + if (retry_count++ > 1000) { + pr_debug("Failed after retrying 1000 times\n"); + err = -1; + goto out_free_maps; + } + goto retry; } From patchwork Mon Oct 21 13:37:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177082 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3435261ill; Mon, 21 Oct 2019 06:39:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4OHtd2gq2C9pd6Q3VJTHVjhhWhIXLQnzdRwQqZFiBgT4fNxH9LsGQi/NJ9QJ0IK9qZP0T X-Received: by 2002:aa7:dd18:: with SMTP id i24mr25583042edv.239.1571665190618; Mon, 21 Oct 2019 06:39:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665190; cv=none; d=google.com; s=arc-20160816; b=JPPcsx7iHxuJhayqMOphs7o3Y6pq4xbT7HgDvswPLaFgnBDD5Rmk4EJc9g9RFtECvJ BTrUjtJQaGc5IWGK3AMXIpWjKCClNbz8KjUpwqz2n2Q++sUi9Z5FNAaan+nn4dCYBx70 wn4CrwWXPuyJa93RtQQcamQm+6oozuJqwTtjafVJoTR5XpXIY9TDz72oFJaFlmAjOvR5 1AxsVkvWhzDXpkQ2nEMuIkWnghMOncT5i3TmJ2xl4QQ6HDjH191FD2v52MNVvCmMugwH Iqe+hiFxD7Iq94h2robIaLxQ2ZdQQFA6YoRU4K8hZGGVDz44cpSZrPpml8quECaUN4Dc SYXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DV1+KuhfIkUisUY/zZd0DhS23dzeS3KrFa50pDifSRA=; b=vHhgDJJvmX45CSAGiUSETrW5SZM888o30UIHEjPkWAglW+HpELTaQV1IgbpzEpZ7pz dveqVqFfv9hBRG3oB9miyrlYzY8544eQCfGLcgy2vOxgChxOFMdFIGd0pAYren8aCF1B 3d4iWnrP/o5hPB3oN+5nyro17Vvie/Hr0SvL1ck3Ja8uelqPW8hw8gr9JLpDeiS2jYMD vO+3URM8fZVtK+y8lFe1B/2kq2TGEt1oKM1XzPtVbXYIpeh0OqDl79nrzsJe0pEw7KeZ uNuAUVgdSKK2+pifEYEa64mz3X03zkWfZWr+CDgNxywhxLzfjH/6nhw8e3mownuAHUNh TPsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dy+IUPvk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si10046535edc.279.2019.10.21.06.39.50; Mon, 21 Oct 2019 06:39:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dy+IUPvk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728921AbfJUNjs (ORCPT + 26 others); Mon, 21 Oct 2019 09:39:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:41350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729322AbfJUNjp (ORCPT ); Mon, 21 Oct 2019 09:39:45 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4F636222CD; Mon, 21 Oct 2019 13:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665184; bh=TKjbtLzyoUTJoSbE0uVvw5o+RJxx7DrmcCrnkTwLt+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dy+IUPvkxw1EarrpGlab9WCoUFxZRUjG95FER+gh1H1O3qtgVKVa+wrCbl6An3qPs vyC3L/QEBQ0Gdq5o2DAoe5pUvHeQFAo3oYJo68OGaYVODUHZp8tHrR50jXvLmPPUep wQHS6jLRjghPTk4OB70qctLeGF4N46MYXN/9fI+w= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Shaokun Zhang , Alexander Shishkin , Jiri Olsa , Mark Rutland , Peter Zijlstra , Will Deacon , linuxarm@huawei.com, Arnaldo Carvalho de Melo Subject: [PATCH 19/57] perf vendor events arm64: Fix Hisi hip08 DDRC PMU eventname Date: Mon, 21 Oct 2019 10:37:56 -0300 Message-Id: <20191021133834.25998-20-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry The "EventName" for the DDRC precharge command event is incorrect, so fix it. Fixes: 57cc732479ba ("perf jevents: Add support for Hisi hip08 DDRC PMU aliasing") Signed-off-by: John Garry Reviewed-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1567612484-195727-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- .../perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0 diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json index 0d1556fcdffe..99f4fc425564 100644 --- a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json @@ -15,7 +15,7 @@ }, { "EventCode": "0x04", - "EventName": "uncore_hisi_ddrc.flux_wr", + "EventName": "uncore_hisi_ddrc.pre_cmd", "BriefDescription": "DDRC precharge commands", "PublicDescription": "DDRC precharge commands", "Unit": "hisi_sccl,ddrc", From patchwork Mon Oct 21 13:37:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177083 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3435305ill; Mon, 21 Oct 2019 06:39:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyi+TGGxA4dET5UK9+rmV3q1lnH/V7OtuVCxidJEeUVB8sxxWjJhd5b+KOFKFQ59IS5O2ID X-Received: by 2002:a17:907:4150:: with SMTP id od24mr21754493ejb.135.1571665192703; Mon, 21 Oct 2019 06:39:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665192; cv=none; d=google.com; s=arc-20160816; b=k4FgjSLk6lxhVROZlXNOqAEyndWlgJ95fHPUtnp9U2iQmMG/PjBOnkIbU7LRW26gk4 EJEcBzxP7yHIQCEjfbOm8csc/v732XjeoyCWNalnsIEhBnUR/4fmInHE1F9fgu5MRbPs IFfaBqLNotMRaaGSkG0ryO4cWK5opgkINQZVWxFYhsWufGuSqIwcmQfGNnzKthV21KfP CbDH++FGyHIykdOBZ6PPMsvSjNGflOWs0UfQk7I6Ftehmakr6m08JtJaioxNP4Yhx4iQ edzQHpXZv7vrQbFLb1eUhD5ZfGGwbeDJIHrHr1HrgQthExY2GFgT54Le8+tbjAdEjeHN 1fvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oKGOXXIgq5/+0KuMhux1U6YR5mtw527OBPID3+99ros=; b=IldSHS/TUcrb2y6cOscnrc3c6tO8BuiFyNmm/9cVO8pgrDFwzOiRQMibOYY4xeNPs3 cI0VcPnFnUmSXImIuY6VCvOz+0Mbzne+OHBfnGOSy5z4rnVn4JV37CQHT6Av/r8Tklpg m5xCWyaFjJV7aPOISJvXfx8uHjTry3tQIqDKkdVXiKV4SiHnLA7PDKnq/96nG4Jn19dg 74aDn8F/FDLNXACZOZvCR533caHbBfgkKl0Cg+rL0Jnjz9MsUD0k3tc1ci5uHip128ts e9D1dZfUVfbqSwgcdsy08jCwaHoUau2GYXahYU9tlI76mRGv50g2AYntTsRX/o8duCUn cusw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eK5kZcdV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si10046535edc.279.2019.10.21.06.39.52; Mon, 21 Oct 2019 06:39:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eK5kZcdV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729344AbfJUNjv (ORCPT + 26 others); Mon, 21 Oct 2019 09:39:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:41416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbfJUNjs (ORCPT ); Mon, 21 Oct 2019 09:39:48 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 04454214B2; Mon, 21 Oct 2019 13:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665188; bh=cM1MTKb+ph4LOAQACBfuPjtegnhcj+XVjswRcu3Ugtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eK5kZcdVadXPgtGJhWT/fHORb8/DXKE4uTeo8cP3kfZ/es7pXGmOieicpRiyG6Zsf e71WOvI2v3pz0N2G8rV3reh9e7hjQ1OiuLddoGOALN/3ixan5zZIDQr7QL9n3TEWcj dlYZjQAuAdo6EpbA5iwHVojo5CGRrOyNaQ7CtQog= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Shaokun Zhang , Alexander Shishkin , Jiri Olsa , Mark Rutland , Peter Zijlstra , Will Deacon , linuxarm@huawei.com, Arnaldo Carvalho de Melo Subject: [PATCH 20/57] perf vendor events arm64: Add some missing events for Hisi hip08 DDRC PMU Date: Mon, 21 Oct 2019 10:37:57 -0300 Message-Id: <20191021133834.25998-21-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry Add some more missing events. Signed-off-by: John Garry Reviewed-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1567612484-195727-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- .../arch/arm64/hisilicon/hip08/uncore-ddrc.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.21.0 diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json index 99f4fc425564..7da86942dae2 100644 --- a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json @@ -1,4 +1,18 @@ [ + { + "EventCode": "0x00", + "EventName": "uncore_hisi_ddrc.flux_wr", + "BriefDescription": "DDRC total write operations", + "PublicDescription": "DDRC total write operations", + "Unit": "hisi_sccl,ddrc", + }, + { + "EventCode": "0x01", + "EventName": "uncore_hisi_ddrc.flux_rd", + "BriefDescription": "DDRC total read operations", + "PublicDescription": "DDRC total read operations", + "Unit": "hisi_sccl,ddrc", + }, { "EventCode": "0x02", "EventName": "uncore_hisi_ddrc.flux_wcmd", From patchwork Mon Oct 21 13:37:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177084 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3435482ill; Mon, 21 Oct 2019 06:40:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxevEJnCP1VkkS0JQ6eQRJw7SIl81TZABtmODBY+cYhK+nO0/lTNu1dK9vIEvlK/KJyIxXO X-Received: by 2002:a17:906:54c7:: with SMTP id c7mr21276964ejp.226.1571665202480; Mon, 21 Oct 2019 06:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665202; cv=none; d=google.com; s=arc-20160816; b=ihiEZEzlsM3TVFB/ka6Ox1fHSvw7FPBOaTWhrmqbU3eKOj+9wGMWsVMze3RSVYNrRn 0PIaG4QPopzOOw0ueS3skb20U8U0iJyoTPigh5GZQnWZeTcT5Oz0XllGEAm66bKaYkNL GZhddDrquVJeU/nLt2rQfyI+itXJ/GL+3DoGnsbWGpVVNaV4hfqCkDyWwuo9XXG2f37Y 4010RzcmspyG+Zivx2hzwdpKLc71oboob/UpZ5iWxeKXTRs9mWscpOaVjZVhU+Ko6/Ab z2rYAuztYd4m51BTnZO/6nmasJ0kUzeARvkJAdWsVl+6s5bikgtNJPe1GhF20SKaZPGD PC9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b3HyM+Bf5ZG18+ZkAeexZp2w+2yqrgbikaduqXQmkEA=; b=W25jkUfXtR+PBzjhsz+pK0sYuiYvIsbVfyWKKwnK2icU+K/T8DVsbXr7VFP4ud+OmQ xIcfDSENS6G/CNFp50rh1Mkm1gxs69vTXLK9JOs9yp/pzX/UUcFR80+i1vevvTDhsGEw G5shupPcRRguvNTLL4XWR7vA2zy2Tmg15aDPobTk+obcxtDCvoajLQi90sdaEXxcd0Ao 3hBY5PUcGqAbVXZblih0ch8kiO2yVUL8/tpJ+mg8JEhOoCNvXfS+wy6VJWoG0bswrfQD sgatd0BVuKs1PCo+2uyqeV2Ranox/NCR2gliVjUWduhtQOvw7cNQWG59RsMG+/6vgstl 7FZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tVTbRLxw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x22si1596672ejv.335.2019.10.21.06.40.02; Mon, 21 Oct 2019 06:40:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tVTbRLxw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729371AbfJUNkA (ORCPT + 26 others); Mon, 21 Oct 2019 09:40:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:41470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbfJUNjw (ORCPT ); Mon, 21 Oct 2019 09:39:52 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ACB452166E; Mon, 21 Oct 2019 13:39:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665191; bh=QaO8bSHrlGSQLLLS56coI3qNcVX5iG2JZY1zbN6UFqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tVTbRLxwqPS9SWbPvrIOmdnGu/X4dTxk0PL6YOYcmMuQ4wtQl/B6Eq+kTWQacyMqj C/32aOOJJQ+5WNOC+hokWtaUK75wRIjhZ9WyXr/fF3Rpn70Fj3QzEsIrj1ijiWD2w7 DER4E1UTjh9lZMTz/JoGscPLcLbeEFoQUJ5SQ9TU= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Shaokun Zhang , Alexander Shishkin , Jiri Olsa , Mark Rutland , Peter Zijlstra , Will Deacon , linuxarm@huawei.com, Arnaldo Carvalho de Melo Subject: [PATCH 21/57] perf vendor events arm64: Add some missing events for Hisi hip08 L3C PMU Date: Mon, 21 Oct 2019 10:37:58 -0300 Message-Id: <20191021133834.25998-22-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry Add some more missing events. Signed-off-by: John Garry Reviewed-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1567612484-195727-4-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- .../arm64/hisilicon/hip08/uncore-l3c.json | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) -- 2.21.0 diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-l3c.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-l3c.json index ca48747642e1..f463d0acfaef 100644 --- a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-l3c.json +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-l3c.json @@ -34,4 +34,60 @@ "PublicDescription": "l3c precharge commands", "Unit": "hisi_sccl,l3c", }, + { + "EventCode": "0x20", + "EventName": "uncore_hisi_l3c.rd_spipe", + "BriefDescription": "Count of the number of read lines that come from this cluster of CPU core in spipe", + "PublicDescription": "Count of the number of read lines that come from this cluster of CPU core in spipe", + "Unit": "hisi_sccl,l3c", + }, + { + "EventCode": "0x21", + "EventName": "uncore_hisi_l3c.wr_spipe", + "BriefDescription": "Count of the number of write lines that come from this cluster of CPU core in spipe", + "PublicDescription": "Count of the number of write lines that come from this cluster of CPU core in spipe", + "Unit": "hisi_sccl,l3c", + }, + { + "EventCode": "0x22", + "EventName": "uncore_hisi_l3c.rd_hit_spipe", + "BriefDescription": "Count of the number of read lines that hits in spipe of this L3C", + "PublicDescription": "Count of the number of read lines that hits in spipe of this L3C", + "Unit": "hisi_sccl,l3c", + }, + { + "EventCode": "0x23", + "EventName": "uncore_hisi_l3c.wr_hit_spipe", + "BriefDescription": "Count of the number of write lines that hits in spipe of this L3C", + "PublicDescription": "Count of the number of write lines that hits in spipe of this L3C", + "Unit": "hisi_sccl,l3c", + }, + { + "EventCode": "0x29", + "EventName": "uncore_hisi_l3c.back_invalid", + "BriefDescription": "Count of the number of L3C back invalid operations", + "PublicDescription": "Count of the number of L3C back invalid operations", + "Unit": "hisi_sccl,l3c", + }, + { + "EventCode": "0x40", + "EventName": "uncore_hisi_l3c.retry_cpu", + "BriefDescription": "Count of the number of retry that L3C suppresses the CPU operations", + "PublicDescription": "Count of the number of retry that L3C suppresses the CPU operations", + "Unit": "hisi_sccl,l3c", + }, + { + "EventCode": "0x41", + "EventName": "uncore_hisi_l3c.retry_ring", + "BriefDescription": "Count of the number of retry that L3C suppresses the ring operations", + "PublicDescription": "Count of the number of retry that L3C suppresses the ring operations", + "Unit": "hisi_sccl,l3c", + }, + { + "EventCode": "0x42", + "EventName": "uncore_hisi_l3c.prefetch_drop", + "BriefDescription": "Count of the number of prefetch drops from this L3C", + "PublicDescription": "Count of the number of prefetch drops from this L3C", + "Unit": "hisi_sccl,l3c", + }, ] From patchwork Mon Oct 21 13:37:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177087 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3438782ill; Mon, 21 Oct 2019 06:42:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIaILBHS8XYteNGcOyYHOmVzcFdg846CBlBxzDJK+O0FG9HNQRVMwNOtY+PiXbhX27u0cD X-Received: by 2002:a50:8f65:: with SMTP id 92mr25947903edy.9.1571665377119; Mon, 21 Oct 2019 06:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665377; cv=none; d=google.com; s=arc-20160816; b=OIFvRVvXBFSH+PHeBF7DezSuzfM+nJ3pUvDcB/kheqB1l4b+DGWLGChEiyrdgqLyPV 7nAJgA00R7VwMFUchwnxpOHJxPrfCIBYblF+lVW+F9Gq0S91Ntb9Y2QXOBLPNkKtWB2b qMTGFrZDm2XiwC1LLsAMg1G+4moRnGqGcZ8qOZSGZ7Jhytqj7rhMdgekLwS8ONUAN2SZ qaNFf85SxRat4p7kZNTYRYS4lXVOhO4entYGp7n1CMplC2qam7mj7W1e07FaJLqdVkCW QNMli98a3OxlrGhDUfWsAF+HXkQjTWPMt42nuROdGJ+xjZNyby/nRmh0HM5Zrot/r6kd 4xSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OrGVqgsWAQtsdSpU5IuggY+a2E2MFlyW+pZ9GL2AEMI=; b=UWtENcsApmbpwpd+oJnJVEsmVcclnJ6Mgu1+qFxCB1ik8otpx5sVPLrCTByFf8tD4D XicTt7MBdBopGelVGnP30Ch4kAYoTWQWMa/fnyRIA0WaQoKdmwX3icOFLnSXfWxHBumH AAtsF+9m3mJKGR1u1QETurdEYl/GGRFouw4HCRW5wYlbgWzxbjEuhfid7xiHa2fmlJKg K/l/2/RtivtOZgxYzMLa0+FvFPyJsN+NT6jRnE/O94tnVGjYlVSRkjloEyes0ELSlrmr xKSjrmZJhG9o5JEwkPDf+Zg1uQvv1ZnCQkgx9i88dkR0u2AMZ8WONqtQmN0m8PZLRAKZ eHoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tr3KUjun; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1si8831256ejf.28.2019.10.21.06.42.56; Mon, 21 Oct 2019 06:42:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tr3KUjun; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729333AbfJUNmy (ORCPT + 26 others); Mon, 21 Oct 2019 09:42:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:41554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729351AbfJUNj4 (ORCPT ); Mon, 21 Oct 2019 09:39:56 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 612C721929; Mon, 21 Oct 2019 13:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665195; bh=OJ45aNISZct2ZDJvxP7I899FNuLrsSm4dUJUusunFsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tr3KUjunfENlxz7TuWlJloSyBHNZZMTdtBHzw3JxGNzXPcOTETQYAjEPPQLvAxw4C aBsWR9zybTn3VCHIALyJGtYMQCleUKWpGGpSaeIUUFuIvHfDnvvyfbq0vnajLaKVNW lAdlqDEuxhRwk9qMRo6a9w+O3kp8QZ1G/9ZNg0oU= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Shaokun Zhang , Alexander Shishkin , Jiri Olsa , Mark Rutland , Peter Zijlstra , Will Deacon , linuxarm@huawei.com, Arnaldo Carvalho de Melo Subject: [PATCH 22/57] perf vendor events arm64: Add some missing events for Hisi hip08 HHA PMU Date: Mon, 21 Oct 2019 10:37:59 -0300 Message-Id: <20191021133834.25998-23-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry Add some more missing events. A trivial typo is also fixed. Signed-off-by: John Garry Reviewed-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1567612484-195727-5-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- .../arm64/hisilicon/hip08/uncore-hha.json | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) -- 2.21.0 diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-hha.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-hha.json index 447d3064de90..3be418a248ea 100644 --- a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-hha.json +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-hha.json @@ -20,6 +20,13 @@ "PublicDescription": "The number of all operations received by the HHA from another SCCL in this socket", "Unit": "hisi_sccl,hha", }, + { + "EventCode": "0x03", + "EventName": "uncore_hisi_hha.rx_ccix", + "BriefDescription": "Count of the number of operations that HHA has received from CCIX", + "PublicDescription": "Count of the number of operations that HHA has received from CCIX", + "Unit": "hisi_sccl,hha", + }, { "EventCode": "0x1c", "EventName": "uncore_hisi_hha.rd_ddr_64b", @@ -29,7 +36,7 @@ }, { "EventCode": "0x1d", - "EventName": "uncore_hisi_hha.wr_dr_64b", + "EventName": "uncore_hisi_hha.wr_ddr_64b", "BriefDescription": "The number of write operations sent by HHA to DDRC which size is 64 bytes", "PublicDescription": "The number of write operations sent by HHA to DDRC which size is 64 bytes", "Unit": "hisi_sccl,hha", @@ -48,4 +55,18 @@ "PublicDescription": "The number of write operations sent by HHA to DDRC which size is 128 bytes", "Unit": "hisi_sccl,hha", }, + { + "EventCode": "0x20", + "EventName": "uncore_hisi_hha.spill_num", + "BriefDescription": "Count of the number of spill operations that the HHA has sent", + "PublicDescription": "Count of the number of spill operations that the HHA has sent", + "Unit": "hisi_sccl,hha", + }, + { + "EventCode": "0x21", + "EventName": "uncore_hisi_hha.spill_success", + "BriefDescription": "Count of the number of successful spill operations that the HHA has sent", + "PublicDescription": "Count of the number of successful spill operations that the HHA has sent", + "Unit": "hisi_sccl,hha", + }, ] From patchwork Mon Oct 21 13:38:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177085 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3436613ill; Mon, 21 Oct 2019 06:41:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxn7OQE95qtoyMqcn4/WyuGkIH00f/r+H1qNnRrGTmN7uOHc4X3g28IO1pHIfFMpzcyfoJN X-Received: by 2002:a05:6402:2028:: with SMTP id ay8mr24832082edb.273.1571665260100; Mon, 21 Oct 2019 06:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665260; cv=none; d=google.com; s=arc-20160816; b=GOmDp6hZ8S+lNUj4AZrYGl6Pb5a9hA150OJsjNFufJYmsXxwi3uTC23l86DoWwh5tM KQZ38qs8xuP+FTt4TyGDWvtlSdYq0+dfVuVhQ3Qh63UbwPGeRslte6ILYT5ZAXRuOO27 6dNDd63qhSIqVsMuJpJlkLOjCFyeu4BpML/+eBZ1kEPkKMiq5xXhKnMt6Jr+XAI4CwAt zT1QNDURvoXJuxcLK4L3filnyasT9n6Ze2LbDYB/PEe9ryBpZm5u9ZCXHdpCbNaikitx 9tVMAl6d87Cc5d1s4W2zqf7B1DTk+cPDqoK0u3sitXlCTz6UaWEzL2690bwKzDSvmAyS cSwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IzyqZVwOwyywGQuHXRnv68bGW2un+fnOBqj/1JpQJGw=; b=Zps/J8olQi0Arx6zZQUFBmt9J7zbfig1onZ/EpqCqrjSgTnAhPRD5Qi3Jdd3r7jGsK tFo9aOJQQ1xiOMXbQUhzws12F3Wkqlc427+GMUZ84Nqt1F+0DtCzOPWN4wenWQ7tTrFb 63m6h5dFq4R9H7j9xGNs/czw4VyBwxX1b2PqvsZyw+2ic/rlTLGFltjbqbnGzUSdDpXg tWUBykR6nVJkOu4eUBXFeZ0nRKdahsnmcYjh0GvjWLjraIQe8pWYn8h/Ky/XY7macFlK t/fW7UupRn20tULehtLkiDMGfE/M+9Vhpn40R3/00DYQNSb/q/76FG4GPh0F5VRO5PGG YKuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PZoUjs8E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si8385612ejr.417.2019.10.21.06.40.59; Mon, 21 Oct 2019 06:41:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PZoUjs8E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729598AbfJUNk5 (ORCPT + 26 others); Mon, 21 Oct 2019 09:40:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:42700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729582AbfJUNku (ORCPT ); Mon, 21 Oct 2019 09:40:50 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 48CC2222D1; Mon, 21 Oct 2019 13:40:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665250; bh=AJ3icIl4iogRm3oOYZzQ+WnkDoBda1+8MpdbYypE+so=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PZoUjs8EsSHRZtwZBbSCkyidxByNkl6yV/HfFZBpF1j8lqoaOADwMMvHOszkbh+ae Ehg5//73uwi7pLtxlub233hqZ22fcLHYah/JfLG8un2utL5d1TDAuKCRFAoyULkzTQ xC3FrGpsPVfpVSKVYzKRT3VY7HatUKDBk6mdVoJs= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Adrian Hunter , Alexander Shishkin , Brajeswar Ghosh , Florian Fainelli , Jiri Olsa , Mark Rutland , Michael Petlan , Peter Zijlstra , Song Liu , Souptick Joarder , Will Deacon , Arnaldo Carvalho de Melo Subject: [PATCH 40/57] perf tests: Remove needless headers for bp_account Date: Mon, 21 Oct 2019 10:38:17 -0300 Message-Id: <20191021133834.25998-41-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan A few headers are not needed and were introduced by copying from other test file. This patch removes the needless headers for the breakpoint accounting testing. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brajeswar Ghosh Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Souptick Joarder Cc: Will Deacon Link: http://lore.kernel.org/lkml/20191018085531.6348-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/bp_account.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.21.0 diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c index 016bba2c142d..52ff7a462670 100644 --- a/tools/perf/tests/bp_account.c +++ b/tools/perf/tests/bp_account.c @@ -10,11 +10,7 @@ #include #include #include -#include #include -#include -#include -#include #include #include "tests.h" From patchwork Mon Oct 21 13:38:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177086 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3436692ill; Mon, 21 Oct 2019 06:41:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxyD9rw6YehEvB7VyLqQSkfYUAzGZoUjK7ZnR2oiMuO+NRh9kHvHol6jFq3IVMFuPM6ALC X-Received: by 2002:a17:906:c836:: with SMTP id dd22mr2701537ejb.178.1571665265059; Mon, 21 Oct 2019 06:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665265; cv=none; d=google.com; s=arc-20160816; b=ag7f9HqDgsnc9VTZrt3ZoGYlqyYGcvnin9/ZiQNg/rs/0A4UPnOmvi1tKIQy1bhdMM qxcFmP9gwa+56FRJ9lwdKHFfLjxNVXWS2qX922+xSJMtrQiB3nEaAt+dmC10DyaMtmUG osEvfwLPaTeT7frziwEnlHvcRZyDgPQT+AbdJstIpw8puOMpSzNMnE9/TQtsTob3nBK5 VvlSeJpF/kTEorVjyIaZWmNYIJZy/pms3saW7f7c0UCxUJ3NnhoeiPQA58fxqpWC1GQc WZE7oSVrbjycp9t5Kf1Hv/jF4BlT9BteEmrRzaKFDwB/iJW6fXGlj9udoYYw6K3LOThM AhPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=abOLawgMHduWFtRiLQNctf6hNZKX7O1Ebqzqlwi3/8M=; b=yGBxY1zh7IgyNSlMRogzTth3eOUKjRXMG3JF8R7+R3ypdilNeTlch6CAAObO5zPLoe 0xzCiX1zblDXkKxFJ6MSK3fv5Put1O2nYW9sbbuiMnUbsb5J7Aj2g2un/otFaTZZrj81 eoVKmtjFadyTNog2rYOuWAOraFtoSb62lhHe6jys0zJKnc7VSH/SiOkPQ7tKvr0Suljv urbxI7a3J+eSe+6za10SoyDU9yj2aOxBvj0S63bA84FHvQk6D9F6yPlRCnke/QnApm/R 6+6Y8KpRut58Nime1M73m4fqkN5/bDEpVBCS9UGRXxZpa8EP7en/p1bob95MO0+YuvEK 9jKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jAjZ1tnH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si12292750edi.326.2019.10.21.06.41.04; Mon, 21 Oct 2019 06:41:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jAjZ1tnH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729610AbfJUNlB (ORCPT + 26 others); Mon, 21 Oct 2019 09:41:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:42790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729593AbfJUNkz (ORCPT ); Mon, 21 Oct 2019 09:40:55 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B01B9217D7; Mon, 21 Oct 2019 13:40:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665254; bh=muH0CLm37RWgXCw9tdoRkRQCcOWFtFZ43VskU7mzloU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jAjZ1tnHd7PmRwzO7RGhm/kKtMDdxMJIwn8rvCuNK3rudi6ZvzW2yj2d9qpisJVur KYXm7OunKNoxH2xTQlr6CQNNU05/PlFmkUbuSQ9a8pkkYb3IDmRurlkk6ncictTLOt sbT/XF8JR7O0eJeurk8Si9inD1bAAGRVDyZmWGVM= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Adrian Hunter , Alexander Shishkin , Brajeswar Ghosh , Florian Fainelli , Jiri Olsa , Mark Rutland , Michael Petlan , Peter Zijlstra , Song Liu , Souptick Joarder , Will Deacon , Arnaldo Carvalho de Melo Subject: [PATCH 41/57] perf tests bp_account: Add dedicated checking helper is_supported() Date: Mon, 21 Oct 2019 10:38:18 -0300 Message-Id: <20191021133834.25998-42-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan The arm architecture supports breakpoint accounting but it doesn't support breakpoint overflow signal handling. The current code uses the same checking helper, thus it disables both testings (bp_account and bp_signal) for arm platform. For handling two testings separately, this patch adds a dedicated checking helper is_supported() for breakpoint accounting testing, thus it allows supporting breakpoint accounting testing on arm platform; the old helper test__bp_signal_is_supported() is only used to checking for breakpoint overflow signal testing. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brajeswar Ghosh Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Souptick Joarder Cc: Will Deacon Link: http://lore.kernel.org/lkml/20191018085531.6348-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/bp_account.c | 16 ++++++++++++++++ tools/perf/tests/builtin-test.c | 2 +- tools/perf/tests/tests.h | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) -- 2.21.0 diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c index 52ff7a462670..d0b935356274 100644 --- a/tools/perf/tests/bp_account.c +++ b/tools/perf/tests/bp_account.c @@ -188,3 +188,19 @@ int test__bp_accounting(struct test *test __maybe_unused, int subtest __maybe_un return bp_accounting(wp_cnt, share); } + +bool test__bp_account_is_supported(void) +{ + /* + * PowerPC and S390 do not support creation of instruction + * breakpoints using the perf_event interface. + * + * Just disable the test for these architectures until these + * issues are resolved. + */ +#if defined(__powerpc__) || defined(__s390x__) + return false; +#else + return true; +#endif +} diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 55774baffc2a..8b286e9b7549 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -121,7 +121,7 @@ static struct test generic_tests[] = { { .desc = "Breakpoint accounting", .func = test__bp_accounting, - .is_supported = test__bp_signal_is_supported, + .is_supported = test__bp_account_is_supported, }, { .desc = "Watchpoint", diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index 72912eb473cb..9837b6e93023 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h @@ -111,6 +111,7 @@ int test__map_groups__merge_in(struct test *t, int subtest); int test__time_utils(struct test *t, int subtest); bool test__bp_signal_is_supported(void); +bool test__bp_account_is_supported(void); bool test__wp_is_supported(void); #if defined(__arm__) || defined(__aarch64__) From patchwork Mon Oct 21 13:38:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177088 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3439025ill; Mon, 21 Oct 2019 06:43:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZK3dqoFrKwpUYN//Dymj+HVYEVbYoScqKBXJekqkxxx7+kTlIfrJrnQB1jMpFh08jj2ER X-Received: by 2002:a17:906:2d49:: with SMTP id e9mr21987197eji.240.1571665268234; Mon, 21 Oct 2019 06:41:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665268; cv=none; d=google.com; s=arc-20160816; b=yzTTpRiN0vfAxzgZC3JERHlehLHCaEmcWyff8FOu79eBdH/EU2yU+vpn7JsY5voTwA ymuyGUtciPQxIMe26JdhddY3HKxOhJgw3uSVzH4yuTA/4hEphK/MUZQa8ulY4DmrCIG0 3XN3MHZJZ3dSbWnUvsyxE+WhOFhLPuwMh1S2wgqAFGMrNP6NVJCazpEK0uWzSsTSKrvv GEOsZQXNPf93sIO8OJ+6DcPBBQkszT+uUdoIlh8AQKl6dwCiVyQf/LV/o7O2a9P/28xO /23m34YnC3PbCR6ZKx8SG9AcaWezy0EKGDzfhEdigW1GeQEZBzmtlzaUBWUcCO5Cixxk 2gEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=F53qv+AoWgm8s1YI0hkli4VRKchnZ9wCqDT3B7fpeng=; b=BAyN+VxgUjHbneQADqLD2o7SXuNtpjquK2zbWKvEflf5nOVkU4i4brmeprvqHuaCGp Rxu7fBCpdfjUdklIwYhC6MwLI0+z3OL5kGyk8Q1aW7T9pJvis/WkmWqoKKSdKGiqakhE iEAPJyixsAXr69IJ7fX3Y8Vbimg9CFXeGpGkeG5Hm8MAWdaa+QEPnegCvkloN7K1ZQJA vbA/zUMAtRN2ggIYwF4wlTy7cvjsnXFNLkiNCLNMCbFaAU1YecIdFZlJVu7Gp5Y6gFuc 4P6N9yrfWYYflwh1yLGQKEVKA/qrrR2GEPfoz3hniR5hZuzspXBwuFPiFOkxH6pCwbZ7 mgag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=clFRhUYj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z33si2306306edz.114.2019.10.21.06.41.07; Mon, 21 Oct 2019 06:41:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=clFRhUYj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729617AbfJUNlF (ORCPT + 26 others); Mon, 21 Oct 2019 09:41:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:42910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729001AbfJUNlA (ORCPT ); Mon, 21 Oct 2019 09:41:00 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2240D21783; Mon, 21 Oct 2019 13:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665259; bh=/yMYdILkEZpciGS3rhWRI3Vk6HWst0iqEjJYsYFZioc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=clFRhUYjybmHd9H6I+nvh3jXC0nFctKgSBRvLrTS7vt5LVbrQ923tHok2KYQxluaQ OCMBvnSiwCNR35NbIDM64C53k6Chi/f319q0fVGDcts2rc7z3z+4IzyGROPGtnyNif SFfISwlJLvtTPNYbvUpxTvf567w37q7+0he7N3bA= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Adrian Hunter , Alexander Shishkin , Brajeswar Ghosh , Florian Fainelli , Jiri Olsa , Mark Rutland , Michael Petlan , Peter Zijlstra , Song Liu , Souptick Joarder , Will Deacon , Arnaldo Carvalho de Melo Subject: [PATCH 42/57] perf tests: Disable bp_signal testing for arm64 Date: Mon, 21 Oct 2019 10:38:19 -0300 Message-Id: <20191021133834.25998-43-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan As there are several discussions for enabling perf breakpoint signal testing on arm64 platform: arm64 needs to rely on single-step to execute the breakpointed instruction and then reinstall the breakpoint exception handler. But if we hook the breakpoint with a signal, the signal handler will do the stepping rather than the breakpointed instruction, this causes infinite loops as below: Kernel space | Userspace ---------------------------------|-------------------------------- | __test_function() -> hit | breakpoint breakpoint_handler() | `-> user_enable_single_step() | do_signal() | | sig_handler() -> Step one | instruction and | trap to kernel single_step_handler() | `-> reinstall_suspended_bps() | | __test_function() -> hit | breakpoint again and | repeat up flow infinitely As Will Deacon mentioned [1]: "that we require the overflow handler to do the stepping on arm/arm64, which is relied upon by GDB/ptrace. The hw_breakpoint code is a complete disaster so my preference would be to rip out the perf part and just implement something directly in ptrace, but it's a pretty horrible job". Though Will commented this on arm architecture, but the comment also can apply on arm64 architecture. For complete information, I searched online and found a few years back, Wang Nan sent one patch 'arm64: Store breakpoint single step state into pstate' [2]; the patch tried to resolve this issue by avoiding single stepping in signal handler and defer to enable the signal stepping when return to __test_function(). The fixing was not merged due to the concern for missing to handle different usage cases. Based on the info, the most feasible way is to skip Perf breakpoint signal testing for arm64 and this could avoid the duplicate investigation efforts when people see the failure. This patch skips this case on arm64 platform, which is same with arm architecture. [1] https://lkml.org/lkml/2018/11/15/205 [2] https://lkml.org/lkml/2015/12/23/477 Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brajeswar Ghosh Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Souptick Joarder Cc: Will Deacon Link: http://lore.kernel.org/lkml/20191018085531.6348-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/bp_signal.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) -- 2.21.0 diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c index c1c2c13de254..166f411568a5 100644 --- a/tools/perf/tests/bp_signal.c +++ b/tools/perf/tests/bp_signal.c @@ -49,14 +49,6 @@ asm ( "__test_function:\n" "incq (%rdi)\n" "ret\n"); -#elif defined (__aarch64__) -extern void __test_function(volatile long *ptr); -asm ( - ".globl __test_function\n" - "__test_function:\n" - "str x30, [x0]\n" - "ret\n"); - #else static void __test_function(volatile long *ptr) { @@ -302,10 +294,15 @@ bool test__bp_signal_is_supported(void) * stepping into the SIGIO handler and getting stuck on the * breakpointed instruction. * + * Since arm64 has the same issue with arm for the single-step + * handling, this case also gets suck on the breakpointed + * instruction. + * * Just disable the test for these architectures until these * issues are resolved. */ -#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__) +#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__) || \ + defined(__aarch64__) return false; #else return true;