From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40BF0C433EF for ; Sun, 8 May 2022 09:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232354AbiEHJ2Q (ORCPT ); Sun, 8 May 2022 05:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232350AbiEHJ2L (ORCPT ); Sun, 8 May 2022 05:28:11 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 668CBE024 for ; Sun, 8 May 2022 02:24:21 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id bo5so9860381pfb.4 for ; Sun, 08 May 2022 02:24:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R3Yh9OX4NzFrM6RxjNS5jxXjJZrys2g1AGRWw+4sxiM=; b=L4aZnxorx/5K/FyzCOaMHHqDwYoXCyPffirpg0K/9WeDHWfajrXwsrMWutnDbImL7l iq1vyg5TEd9ikVUAPyJa6VAYUbvw476mXhzVBvA6cxj9NI9xqQl+HTudKf7aqR/nIZux Uqbq1Mpxy5jdPUmXTrXmD+XqG77VEdOD8766V2kk2oz8zTdj5Yh0Q2w4prglJuOmbPsn eyvltP5lKuWV62LmTo4o3C9N9/uA4rF0bxNE9kTQwHjxN0Y1YWKV8GNBDaT4/Jrz7QI0 M3ncfb3tBn7IRLzQ51pMwSHgT1Xw/aRoXTlcPnlFd3bwUuN0wmItkHY/q2eCwdlFaIP1 pg9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R3Yh9OX4NzFrM6RxjNS5jxXjJZrys2g1AGRWw+4sxiM=; b=DMUcnoxfxIH+UYrmlUb+3oG5fzlEbMDxkvdc5qdRn1OyR0T8eswXwwX3rwFXdbnPjd SyLR7cr4qbR1Fc52tI2zyT6CLCINGpMlDAwTEymltp++AARhiIuy16H859Yo6kXlQxja MAy3ROJcK+/MbX8By6lfnOCxfihs8LODB+ehMd9pWisfY0y/2ChrC2zwTA8M/YmhvicE E4uulmmkXrt18zsrSW1kkZQsY+7YBaK5iKo1L9l2AErsS5uXJyqV8FHWqSvbywXypKO1 AzDM5dDds+f+WHRdHPdcuRkBAqSIrZnbVQKLyBAV+eAq6pcztCdRpnNROSY+EpCmZwGH 6Ong== X-Gm-Message-State: AOAM531CYJ+bqFLYfp6662JDoNepRMTW3xKZ7fioC43wTEkuk2d9/wYt AN9uk54JYiOazWPBCvXcppOYbA== X-Google-Smtp-Source: ABdhPJwSzCeWNy6Ymqaq6+EvL9I5Yp5OEdF3qIuc/kEa+YbQ8tadZpsCQGbYQMVn7ElcZrDXN1bc0w== X-Received: by 2002:a65:6e0d:0:b0:3c6:12af:15b4 with SMTP id bd13-20020a656e0d000000b003c612af15b4mr9084353pgb.338.1652001860809; Sun, 08 May 2022 02:24:20 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:24:20 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 01/11] perf mem: Add stats for store operation with no available memory level Date: Sun, 8 May 2022 17:23:36 +0800 Message-Id: <20220508092346.255826-2-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Sometimes we don't know memory store operations happen on exactly which memory (or cache) level, the memory level flag is set to PERF_MEM_LVL_NA in this case; a practical example is Arm SPE AUX trace sets this flag for all store operations due to absent info for cache level. This patch is to add a new item "st_na" in structure c2c_stats to add statistics for store operations with no available cache level. Signed-off-by: Leo Yan --- tools/perf/util/mem-events.c | 3 +++ tools/perf/util/mem-events.h | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c index db5225caaabe..5dca1882c284 100644 --- a/tools/perf/util/mem-events.c +++ b/tools/perf/util/mem-events.c @@ -621,6 +621,8 @@ do { \ } if (lvl & P(LVL, MISS)) if (lvl & P(LVL, L1)) stats->st_l1miss++; + if (lvl & P(LVL, NA)) + stats->st_na++; } else { /* unparsable data_src? */ stats->noparse++; @@ -647,6 +649,7 @@ void c2c_add_stats(struct c2c_stats *stats, struct c2c_= stats *add) stats->st_noadrs +=3D add->st_noadrs; stats->st_l1hit +=3D add->st_l1hit; stats->st_l1miss +=3D add->st_l1miss; + stats->st_na +=3D add->st_na; stats->load +=3D add->load; stats->ld_excl +=3D add->ld_excl; stats->ld_shared +=3D add->ld_shared; diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h index 916242f8020a..8a8b568baeee 100644 --- a/tools/perf/util/mem-events.h +++ b/tools/perf/util/mem-events.h @@ -63,6 +63,7 @@ struct c2c_stats { u32 st_noadrs; /* cacheable store with no address */ u32 st_l1hit; /* count of stores that hit L1D */ u32 st_l1miss; /* count of stores that miss L1D */ + u32 st_na; /* count of stores with memory level is not avai= lable */ u32 load; /* count of all loads in trace */ u32 ld_excl; /* exclusive loads, rmt/lcl DRAM - snp none/miss= */ u32 ld_shared; /* shared loads, rmt/lcl DRAM - snp hit */ --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E432C433EF for ; Sun, 8 May 2022 09:24:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232508AbiEHJ2e (ORCPT ); Sun, 8 May 2022 05:28:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232422AbiEHJ2Z (ORCPT ); Sun, 8 May 2022 05:28:25 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BB4E02F for ; Sun, 8 May 2022 02:24:31 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id y41so5038613pfw.12 for ; Sun, 08 May 2022 02:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=adiuZus1maUGP/35T5HT7LXaz99C0SKn0msg0uKYXW8=; b=i8zmS7fNcf2Uqf80BMwZbUzVZfZB3jvYS/LuZ1fsuDMFRC9qjeY1Yn+LkbtTx1e7Uv YlnfDTImnnkiVTvGE+/FNFVZ4nE2t3DQYgMmzpT9iKGBbseG4HGYIDrNiEB9+kHxX49/ FSivlTkXrKbTs7hZh83VFvymwS62yBKFNtvB9LOVk76U3QUwwg7rktUQNpBvI3pT9Tpz X+wnN+GnxK1GrFk4Q9WGX6003dwhALK4tJg2k6iKBVp9p92E0l5YI0w8YuUvrE7v6CGY 9IzFnR4o7cO+oItishn1I9cX2ni46UaGX8YGzMHHIuFfrEa712l3u/MmnVNYyIqDQ6Gn 4WCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=adiuZus1maUGP/35T5HT7LXaz99C0SKn0msg0uKYXW8=; b=ht7bWQ503rNgGTUIA4KDTG4DdwegZZxj4LJl0K+INcWPAFO0v1wux7ml7mgi2PVzub ZrbgFvzf9fB/ecezj89Q7WehQzgTQAyCcizSuJ44KzMVj9s4MtgqKwI5OnLTfv1RrUuf VITfqBlYODBRKyCD29qj9MaeZi6tj/D0eBaheBRM0lZiIk5tJIWNFLgMVJkZ1BjN8EEu TBjYwLIWEcMUuYuW0SluXL+z8TDG2ZYbbWQoQHai3F5Pnz/XcHBru9R2nkRG7ZumlbcT QO7++NCzfd2pDH2qhaP+EIX24c1GR9a6B2wDaY++eb7vDSV8IzenEeEYDyUbdvy0W8y4 0Sdg== X-Gm-Message-State: AOAM533RZgRBIP13D3xMgBHz2WMFsuDFsRVAotthTh2VMfYfSchSsK27 4D4xtDqI9QcvQSN++IskA5b3sw== X-Google-Smtp-Source: ABdhPJzs3AUr4ydFCDe3iw6J2gavJcqSK1BAtbvZtK3IPfenkrLjK8bwe7MM2PiD/po/alVs/BQccg== X-Received: by 2002:aa7:9f1d:0:b0:50d:3ae5:9cac with SMTP id g29-20020aa79f1d000000b0050d3ae59cacmr11152738pfr.9.1652001871162; Sun, 08 May 2022 02:24:31 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:24:30 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 02/11] perf c2c: Add dimensions for 'N/A' metrics of store operation Date: Sun, 8 May 2022 17:23:37 +0800 Message-Id: <20220508092346.255826-3-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since now we have the statistics 'st_na' for store operations, add dimensions for the 'N/A' (no available memory level) metrics and the associated percentage calculation for the single cache line view. Signed-off-by: Leo Yan --- tools/perf/builtin-c2c.c | 80 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index fbbed434014f..c8230c48125f 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -653,6 +653,7 @@ STAT_FN(lcl_hitm) STAT_FN(store) STAT_FN(st_l1hit) STAT_FN(st_l1miss) +STAT_FN(st_na) STAT_FN(ld_fbhit) STAT_FN(ld_l1hit) STAT_FN(ld_l2hit) @@ -677,7 +678,8 @@ static uint64_t total_records(struct c2c_stats *stats) =20 total =3D ldcnt + stats->st_l1hit + - stats->st_l1miss; + stats->st_l1miss + + stats->st_na; =20 return total; } @@ -899,6 +901,7 @@ PERCENT_FN(rmt_hitm) PERCENT_FN(lcl_hitm) PERCENT_FN(st_l1hit) PERCENT_FN(st_l1miss) +PERCENT_FN(st_na) =20 static int percent_rmt_hitm_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, @@ -1024,6 +1027,37 @@ percent_stores_l1miss_cmp(struct perf_hpp_fmt *fmt _= _maybe_unused, return per_left - per_right; } =20 +static int +percent_stores_na_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, + struct hist_entry *he) +{ + int width =3D c2c_width(fmt, hpp, he->hists); + double per =3D PERCENT(he, st_na); + char buf[10]; + + return scnprintf(hpp->buf, hpp->size, "%*s", width, PERC_STR(buf, per)); +} + +static int +percent_stores_na_color(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, + struct hist_entry *he) +{ + return percent_color(fmt, hpp, he, percent_st_na); +} + +static int64_t +percent_stores_na_cmp(struct perf_hpp_fmt *fmt __maybe_unused, + struct hist_entry *left, struct hist_entry *right) +{ + double per_left; + double per_right; + + per_left =3D PERCENT(left, st_na); + per_right =3D PERCENT(right, st_na); + + return per_left - per_right; +} + STAT_FN(lcl_dram) STAT_FN(rmt_dram) =20 @@ -1351,7 +1385,7 @@ static struct c2c_dimension dim_tot_stores =3D { }; =20 static struct c2c_dimension dim_stores_l1hit =3D { - .header =3D HEADER_SPAN("---- Stores ----", "L1Hit", 1), + .header =3D HEADER_SPAN("--------- Stores --------", "L1Hit", 2), .name =3D "stores_l1hit", .cmp =3D st_l1hit_cmp, .entry =3D st_l1hit_entry, @@ -1366,8 +1400,16 @@ static struct c2c_dimension dim_stores_l1miss =3D { .width =3D 7, }; =20 +static struct c2c_dimension dim_stores_na =3D { + .header =3D HEADER_SPAN_LOW("N/A"), + .name =3D "stores_na", + .cmp =3D st_na_cmp, + .entry =3D st_na_entry, + .width =3D 7, +}; + static struct c2c_dimension dim_cl_stores_l1hit =3D { - .header =3D HEADER_SPAN("-- Store Refs --", "L1 Hit", 1), + .header =3D HEADER_SPAN("------- Store Refs ------", "L1 Hit", 2), .name =3D "cl_stores_l1hit", .cmp =3D st_l1hit_cmp, .entry =3D st_l1hit_entry, @@ -1382,6 +1424,14 @@ static struct c2c_dimension dim_cl_stores_l1miss =3D= { .width =3D 7, }; =20 +static struct c2c_dimension dim_cl_stores_na =3D { + .header =3D HEADER_SPAN_LOW("N/A"), + .name =3D "cl_stores_na", + .cmp =3D st_na_cmp, + .entry =3D st_na_entry, + .width =3D 7, +}; + static struct c2c_dimension dim_ld_fbhit =3D { .header =3D HEADER_SPAN("----- Core Load Hit -----", "FB", 2), .name =3D "ld_fbhit", @@ -1471,7 +1521,7 @@ static struct c2c_dimension dim_percent_lcl_hitm =3D { }; =20 static struct c2c_dimension dim_percent_stores_l1hit =3D { - .header =3D HEADER_SPAN("-- Store Refs --", "L1 Hit", 1), + .header =3D HEADER_SPAN("------- Store Refs ------", "L1 Hit", 2), .name =3D "percent_stores_l1hit", .cmp =3D percent_stores_l1hit_cmp, .entry =3D percent_stores_l1hit_entry, @@ -1488,6 +1538,15 @@ static struct c2c_dimension dim_percent_stores_l1mis= s =3D { .width =3D 7, }; =20 +static struct c2c_dimension dim_percent_stores_na =3D { + .header =3D HEADER_SPAN_LOW("N/A"), + .name =3D "percent_stores_na", + .cmp =3D percent_stores_na_cmp, + .entry =3D percent_stores_na_entry, + .color =3D percent_stores_na_color, + .width =3D 7, +}; + static struct c2c_dimension dim_dram_lcl =3D { .header =3D HEADER_SPAN("--- Load Dram ----", "Lcl", 1), .name =3D "dram_lcl", @@ -1618,8 +1677,10 @@ static struct c2c_dimension *dimensions[] =3D { &dim_tot_stores, &dim_stores_l1hit, &dim_stores_l1miss, + &dim_stores_na, &dim_cl_stores_l1hit, &dim_cl_stores_l1miss, + &dim_cl_stores_na, &dim_ld_fbhit, &dim_ld_l1hit, &dim_ld_l2hit, @@ -1632,6 +1693,7 @@ static struct c2c_dimension *dimensions[] =3D { &dim_percent_lcl_hitm, &dim_percent_stores_l1hit, &dim_percent_stores_l1miss, + &dim_percent_stores_na, &dim_dram_lcl, &dim_dram_rmt, &dim_pid, @@ -2149,6 +2211,7 @@ static void print_c2c__display_stats(FILE *out) fprintf(out, " Store - no mapping : %10d\n", stats->st_no= adrs); fprintf(out, " Store L1D Hit : %10d\n", stats->st_l1= hit); fprintf(out, " Store L1D Miss : %10d\n", stats->st_l1= miss); + fprintf(out, " Store No available memory level : %10d\n", stats->st_na= ); fprintf(out, " No Page Map Rejects : %10d\n", stats->nomap= ); fprintf(out, " Unable to parse data source : %10d\n", stats->nopar= se); } @@ -2171,6 +2234,7 @@ static void print_shared_cacheline_info(FILE *out) fprintf(out, " Blocked Access on shared lines : %10d\n", stats->blk_d= ata + stats->blk_addr); fprintf(out, " Store HITs on shared lines : %10d\n", stats->store= ); fprintf(out, " Store L1D hits on shared lines : %10d\n", stats->st_l1= hit); + fprintf(out, " Store No available memory level : %10d\n", stats->st_na= ); fprintf(out, " Total Merged records : %10d\n", hitm_cnt + s= tats->store); } =20 @@ -2193,10 +2257,10 @@ static void print_cacheline(struct c2c_hists *c2c_h= ists, fprintf(out, "\n"); } =20 - fprintf(out, " ---------------------------------------------------------= ----\n"); + fprintf(out, " ---------------------------------------------------------= -------------\n"); __hist_entry__snprintf(he_cl, &hpp, hpp_list); fprintf(out, "%s\n", bf); - fprintf(out, " ---------------------------------------------------------= ----\n"); + fprintf(out, " ---------------------------------------------------------= -------------\n"); =20 hists__fprintf(&c2c_hists->hists, false, 0, 0, 0, out, false); } @@ -2213,6 +2277,7 @@ static void print_pareto(FILE *out) "cl_lcl_hitm," "cl_stores_l1hit," "cl_stores_l1miss," + "cl_stores_na," "dcacheline"; =20 perf_hpp_list__init(&hpp_list); @@ -2664,6 +2729,7 @@ static int build_cl_output(char *cl_sort, bool no_sou= rce) "percent_lcl_hitm," "percent_stores_l1hit," "percent_stores_l1miss," + "percent_stores_na," "offset,offset_node,dcacheline_count,", add_pid ? "pid," : "", add_tid ? "tid," : "", @@ -2850,7 +2916,7 @@ static int perf_c2c__report(int argc, const char **ar= gv) "tot_recs," "tot_loads," "tot_stores," - "stores_l1hit,stores_l1miss," + "stores_l1hit,stores_l1miss,stores_na," "ld_fbhit,ld_l1hit,ld_l2hit," "ld_lclhit,lcl_hitm," "ld_rmthit,rmt_hitm," --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2AC7C433EF for ; Sun, 8 May 2022 09:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232842AbiEHJ2z (ORCPT ); Sun, 8 May 2022 05:28:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232466AbiEHJ2b (ORCPT ); Sun, 8 May 2022 05:28:31 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18D51E025 for ; Sun, 8 May 2022 02:24:42 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id iq10so10736075pjb.0 for ; Sun, 08 May 2022 02:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lPhdUw6/xRTj5eRnk/v+0C6+XGKs0gs1fQItGV05POc=; b=JHV7gnh3NYXiAdRA1WXm+zWhMZQYRMfuuvrBAALmzQyuAPV8GId/Hm7iFogCgfky21 K99kFpaSwtoiI+yhw24x7mbWHUoX8FVN9/ZzlQKeqEyA7e3TrwSeZ8GVR612ZtSsrARn Ykdipe4E+U3hYvW+FbW0RkTrdrwv69GBQa7LLfVGCFoPHGq6ifTVsfrnCDGKbd/DDUrg fuBS3eC53OtHXTnyUIE0NpRFzB72NgISNo8hBf5oTAkp9yMjjil8fnYGkXV9ZddK+bDE D9L09XCVuVEVL2QFnClRTlRhwMtNqefnU52unoBcGvFgKR5zOfVdXkbVEOntbp6uoJuI f/pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lPhdUw6/xRTj5eRnk/v+0C6+XGKs0gs1fQItGV05POc=; b=gc0Ah/CWyOLa+uGzjWqyOK5ldK2HtwU3D59vv0u5dZgazDnvBD+tktz+ff8DxNoaw0 mRgja0/CWDCALR86goNhxOnXWiHljhzBNv/hy8lhHd1KcVHIO05WqvwhCM+4LAAYQAFb R3yiCFhnLkNpwUpSQRpFpmA34fewPW/ToZs6cfUS2tBQxxWXr6R5hkc+n9IbYtorvfLJ AY3+nzfYgos7aVgVp+Gp5LCN4wLO7b+xPVIq3OJXr5VRIgfd/qhDq+srEcPJo38vwsPr DHBp2kmGLSVvquuwxdJHwUiaHzOt0jT4rQ1WMKI6A4UAtnW42+gP3Npqt1rRlViVXGRn n35A== X-Gm-Message-State: AOAM531JDmUPAAkr5gAcNqukaCEyEDYFpzKL0ua9oR+EpLizOFChw7kx S1XWEme0OXBd0Ze2w5+pi5RghA== X-Google-Smtp-Source: ABdhPJx8b1S7DP+l6TbHcjaDTxe+bP3mjVWrvxdRZjRpNA9ShTXWg/U5lWdyGp5WzpTFOapVuyHoYg== X-Received: by 2002:a17:903:1111:b0:15f:7f0:bbf3 with SMTP id n17-20020a170903111100b0015f07f0bbf3mr2621799plh.12.1652001881479; Sun, 08 May 2022 02:24:41 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:24:41 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 03/11] perf c2c: Update documentation for store metric 'N/A' Date: Sun, 8 May 2022 17:23:38 +0800 Message-Id: <20220508092346.255826-4-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The 'N/A' metric is added for store operations, update documentation to reflect changes in the report table. Signed-off-by: Leo Yan --- tools/perf/Documentation/perf-c2c.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/perf/Documentation/perf-c2c.txt b/tools/perf/Documentati= on/perf-c2c.txt index 3b6a2c84ea02..6f69173731aa 100644 --- a/tools/perf/Documentation/perf-c2c.txt +++ b/tools/perf/Documentation/perf-c2c.txt @@ -189,9 +189,10 @@ For each cacheline in the 1) list we display following= data: Total stores - sum of all store accesses =20 - Store Reference - L1Hit, L1Miss + Store Reference - L1Hit, L1Miss, N/A L1Hit - store accesses that hit L1 L1Miss - store accesses that missed L1 + N/A - store accesses with memory level is not available =20 Core Load Hit - FB, L1, L2 - count of load hits in FB (Fill Buffer), L1 and L2 cache @@ -210,8 +211,9 @@ For each offset in the 2) list we display following dat= a: HITM - Rmt, Lcl - % of Remote/Local HITM accesses for given offset within cacheline =20 - Store Refs - L1 Hit, L1 Miss - - % of store accesses that hit/missed L1 for given offset within cacheli= ne + Store Refs - L1 Hit, L1 Miss, N/A + - % of store accesses that hit L1, missed L1 and N/A (no available) memo= ry + level for given offset within cacheline =20 Data address - Offset - offset address --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68690C433EF for ; Sun, 8 May 2022 09:25:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232622AbiEHJ3X (ORCPT ); Sun, 8 May 2022 05:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232803AbiEHJ2z (ORCPT ); Sun, 8 May 2022 05:28:55 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA18E0F7 for ; Sun, 8 May 2022 02:24:52 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id k14so9698013pga.0 for ; Sun, 08 May 2022 02:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5BXrzgVYvBGmdSlnVtQEfhW9GvqhlJo5cHBeUasgrT0=; b=m/cdnGfmFdCyz4qMJ0TDedpp4hXKvP4FdzdgVPwdRA1JPMyl3HH2PXSs/zqmjUK8Yj j8LLh7IwZZE2asbvtbREP1KYtwMzE8ZaIAOZHKe13HpEeROLSUxD29VQZ753AAcupuPr 4WXZeM+Agimptk0ri1iS7S/VTB5ON/yhUDfGxeGixUP8diFW0gPYwMd94tk3VDrpDsHp fclXv5S2hWlTszfCAm+rHAUmOqVkXBPbcAvKR7bHveM+VZ4yw+kgDE8nEojKhPZ2R+R4 HY4/stC/o9G1CJPbZ3bIZabeWDJTmg5ddkgT7zoW+JEn2QGhfID6UE+FGnJr0Agy67zo 8mWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5BXrzgVYvBGmdSlnVtQEfhW9GvqhlJo5cHBeUasgrT0=; b=VXUNnP3xfDhEh/b/H43cDwsu8RIyd8A6k8HSTqBSRD8rQBIVnnT8d54Ye5EpvW0mJe DbPsnwEDJBYEm+QzD9OY0ooH15b52A82ahvaNJNcKrgBzG1Ira1OK6HKW9FkoDVYitZe RNxXrJmcWwau8l2a+mHO2WPwAs4ozyhPRviHFqb/fehE6QVXs6JEruv4uOHSFX6jM5ij XC0pPy4elWasRaN+jCaxrAaZpSpRK1H6YANopVeNZ7200m5GJNXyH/wj2rlNrpEZReEy jMG+MpnF0VljaVVQyhZ9oWNvwMeXSEprbH220BAgdKGBVLdgM79LL1JmZUpv5BtV3OJL k4Kg== X-Gm-Message-State: AOAM532u/HxRSWDS5WcWMd6SnuzHMgFGM2fpYzNFbqPqgLvrjPwLW/7k Yn+5cUy7eHh2Ve4u4jj8X5TEiQ== X-Google-Smtp-Source: ABdhPJxOaWtOaVBRUtO1R715aj1dzFF6MiY8rXICAcPeEyvZK4qcijUvkS/3X+ACJ2ULeHrFJ0ha7Q== X-Received: by 2002:a05:6a00:ad0:b0:4e1:2d96:2ab0 with SMTP id c16-20020a056a000ad000b004e12d962ab0mr11095296pfl.3.1652001891834; Sun, 08 May 2022 02:24:51 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:24:51 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 04/11] perf mem: Add statistics for peer snooping Date: Sun, 8 May 2022 17:23:39 +0800 Message-Id: <20220508092346.255826-5-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since we have added the flag PERF_MEM_SNOOPX_PEER to support cache snooping from peer core or cluster, this patch is to add statistics for this new flag. Signed-off-by: Leo Yan Tested-by: Ali Saidi --- tools/perf/util/mem-events.c | 11 ++++++++++- tools/perf/util/mem-events.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c index 5dca1882c284..6cd2b6ffb4a4 100644 --- a/tools/perf/util/mem-events.c +++ b/tools/perf/util/mem-events.c @@ -525,6 +525,7 @@ int c2c_decode_stats(struct c2c_stats *stats, struct me= m_info *mi) u64 op =3D data_src->mem_op; u64 lvl =3D data_src->mem_lvl; u64 snoop =3D data_src->mem_snoop; + u64 snoopx =3D data_src->mem_snoopx; u64 lock =3D data_src->mem_lock; u64 blk =3D data_src->mem_blk; /* @@ -567,10 +568,17 @@ do { \ if (lvl & P(LVL, IO)) stats->ld_io++; if (lvl & P(LVL, LFB)) stats->ld_fbhit++; if (lvl & P(LVL, L1 )) stats->ld_l1hit++; - if (lvl & P(LVL, L2 )) stats->ld_l2hit++; + if (lvl & P(LVL, L2)) { + if (snoopx & P(SNOOPX, PEER)) + stats->ld_peer++; + else + stats->ld_l2hit++; + } if (lvl & P(LVL, L3 )) { if (snoop & P(SNOOP, HITM)) HITM_INC(lcl_hitm); + else if (snoopx & P(SNOOPX, PEER)) + stats->ld_peer++; else stats->ld_llchit++; } @@ -661,6 +669,7 @@ void c2c_add_stats(struct c2c_stats *stats, struct c2c_= stats *add) stats->ld_l1hit +=3D add->ld_l1hit; stats->ld_l2hit +=3D add->ld_l2hit; stats->ld_llchit +=3D add->ld_llchit; + stats->ld_peer +=3D add->ld_peer; stats->lcl_hitm +=3D add->lcl_hitm; stats->rmt_hitm +=3D add->rmt_hitm; stats->tot_hitm +=3D add->tot_hitm; diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h index 8a8b568baeee..4879b841c841 100644 --- a/tools/perf/util/mem-events.h +++ b/tools/perf/util/mem-events.h @@ -75,6 +75,7 @@ struct c2c_stats { u32 ld_l1hit; /* count of loads that hit L1D */ u32 ld_l2hit; /* count of loads that hit L2D */ u32 ld_llchit; /* count of loads that hit LLC */ + u32 ld_peer; /* count of loads that hit peer core or cluster = cache */ u32 lcl_hitm; /* count of loads with local HITM */ u32 rmt_hitm; /* count of loads with remote HITM */ u32 tot_hitm; /* count of loads with local and remote HITM */ --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C880BC433EF for ; Sun, 8 May 2022 09:25:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232778AbiEHJ3i (ORCPT ); Sun, 8 May 2022 05:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbiEHJ24 (ORCPT ); Sun, 8 May 2022 05:28:56 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD65FFD09 for ; Sun, 8 May 2022 02:25:02 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id n18so11350060plg.5 for ; Sun, 08 May 2022 02:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/IyVJrkvFAuSTbKH1k0HSgFwWdoXMGg8GhXhg7iANkU=; b=xaoiWDJuJ96cYu9uM9LPzRVy2v6R/dB34eqizgQ1ZN3Jy1fU3qa9IZpCbSxFoOzb8+ Zu/EuA54HBiyIJGvKTPCwsPOyksAjWqLh2jEl+Kx74oWX59Hieg5hPsD7q9Pkefy+nMq tLL15ZeVkCFCYkNPjh8ftURU1psXPnZj5CMkoA5fzICgXTvLT5flxXZcyB8Zqd0wsJAM 2QgO5LOyOTJAuF5+BbgM8Bkuicl8uVySyacOesMowAhszlm10Kwzsima6GLg1Pm8JffU jOO4U7Zhg5zlQXn+mkvy15UTzj1TwpD0RaaB7z/bWn0fxI0xYgM22K6zJlECLIfsWtRF H7yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/IyVJrkvFAuSTbKH1k0HSgFwWdoXMGg8GhXhg7iANkU=; b=UT/IVhXvOZRrBYIKMzYJaIQXWu2H2tZdlzzUJ2wdpT4WD5DqYZRFFiyEBKiXXy5Jl8 6XGqlAlXTrevWTbKHNg6ZAd9ntKSm9dIUi6TjXwQYuHE9mysgk2uvqXT3ZvoqsnO8PlG HOchsp5qmw46hk//orQrTXaQVj0imwKWoCzeq+G4CYoEDfdZNTTzqNY5VyjjlwHLZzPy aYsY6xc2ADc7dv9oYH9VFW7qWuzPLcld5FTElVJIJAkMd/4kC3FYBSMjYSfPraMglvQ+ ezJM0Zq3d6u3JtoWrlVwZenkIBZw3yZQzZrkVCOnPdHfSWDIuufdsSBG3Yvwhu1wQGcG akBw== X-Gm-Message-State: AOAM532kW0tk/Mr+QJ9oYEqwuMwrtYF/6dWhfMq60mcBzrWeMExbogWZ GOguYhPcXy0EyVDMaaF49wSMVg== X-Google-Smtp-Source: ABdhPJz/PTXeZuDuUggB3R+iXiRwdtX63d4GaBkPRYaW7AaNZoB/feJ29S624OT0w2ZftmF+8wXVzQ== X-Received: by 2002:a17:90a:bb0e:b0:1dc:a406:3566 with SMTP id u14-20020a17090abb0e00b001dca4063566mr12722217pjr.135.1652001902256; Sun, 08 May 2022 02:25:02 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.24.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:25:02 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 05/11] perf c2c: Add dimensions for peer load operations Date: Sun, 8 May 2022 17:23:40 +0800 Message-Id: <20220508092346.255826-6-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This patch is to add dimensions for peer load operations, include a dimension for the total statistics for metric 'ld_peer', and also add dimensions for the single cache line view. Same as HTIM metrics, this patch also adds the dimension for mean value for peer load operations. Signed-off-by: Leo Yan Tested-by: Ali Saidi --- tools/perf/builtin-c2c.c | 93 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index c8230c48125f..baa003c150b1 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -55,6 +55,7 @@ struct c2c_hists { struct compute_stats { struct stats lcl_hitm; struct stats rmt_hitm; + struct stats ld_peer; struct stats load; }; =20 @@ -154,6 +155,7 @@ static void *c2c_he_zalloc(size_t size) =20 init_stats(&c2c_he->cstats.lcl_hitm); init_stats(&c2c_he->cstats.rmt_hitm); + init_stats(&c2c_he->cstats.ld_peer); init_stats(&c2c_he->cstats.load); =20 return &c2c_he->he; @@ -253,6 +255,8 @@ static void compute_stats(struct c2c_hist_entry *c2c_he, update_stats(&cstats->rmt_hitm, weight); else if (stats->lcl_hitm) update_stats(&cstats->lcl_hitm, weight); + else if (stats->ld_peer) + update_stats(&cstats->ld_peer, weight); else if (stats->load) update_stats(&cstats->load, weight); } @@ -658,6 +662,7 @@ STAT_FN(ld_fbhit) STAT_FN(ld_l1hit) STAT_FN(ld_l2hit) STAT_FN(ld_llchit) +STAT_FN(ld_peer) STAT_FN(rmt_hit) =20 static uint64_t total_records(struct c2c_stats *stats) @@ -674,7 +679,8 @@ static uint64_t total_records(struct c2c_stats *stats) stats->ld_l1hit + stats->ld_l2hit + stats->ld_llchit + - stats->lcl_hitm; + stats->lcl_hitm + + stats->ld_peer; =20 total =3D ldcnt + stats->st_l1hit + @@ -730,7 +736,8 @@ static uint64_t total_loads(struct c2c_stats *stats) stats->ld_l1hit + stats->ld_l2hit + stats->ld_llchit + - stats->lcl_hitm; + stats->lcl_hitm + + stats->ld_peer; =20 return ldcnt; } @@ -899,6 +906,7 @@ static double percent_ ## __f(struct c2c_hist_entry *c2= c_he) \ =20 PERCENT_FN(rmt_hitm) PERCENT_FN(lcl_hitm) +PERCENT_FN(ld_peer) PERCENT_FN(st_l1hit) PERCENT_FN(st_l1miss) PERCENT_FN(st_na) @@ -965,6 +973,37 @@ percent_lcl_hitm_cmp(struct perf_hpp_fmt *fmt __maybe_= unused, return per_left - per_right; } =20 +static int +percent_ld_peer_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, + struct hist_entry *he) +{ + int width =3D c2c_width(fmt, hpp, he->hists); + double per =3D PERCENT(he, ld_peer); + char buf[10]; + + return scnprintf(hpp->buf, hpp->size, "%*s", width, PERC_STR(buf, per)); +} + +static int +percent_ld_peer_color(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, + struct hist_entry *he) +{ + return percent_color(fmt, hpp, he, percent_ld_peer); +} + +static int64_t +percent_ld_peer_cmp(struct perf_hpp_fmt *fmt __maybe_unused, + struct hist_entry *left, struct hist_entry *right) +{ + double per_left; + double per_right; + + per_left =3D PERCENT(left, ld_peer); + per_right =3D PERCENT(right, ld_peer); + + return per_left - per_right; +} + static int percent_stores_l1hit_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) @@ -1213,6 +1252,7 @@ __func(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp= , struct hist_entry *he) \ MEAN_ENTRY(mean_rmt_entry, rmt_hitm); MEAN_ENTRY(mean_lcl_entry, lcl_hitm); MEAN_ENTRY(mean_load_entry, load); +MEAN_ENTRY(mean_peer_entry, ld_peer); =20 static int cpucnt_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, @@ -1360,6 +1400,14 @@ static struct c2c_dimension dim_rmt_hitm =3D { .width =3D 7, }; =20 +static struct c2c_dimension dim_ld_peer =3D { + .header =3D HEADER_BOTH("Snoop", "Peer"), + .name =3D "ld_peer", + .cmp =3D ld_peer_cmp, + .entry =3D ld_peer_entry, + .width =3D 7, +}; + static struct c2c_dimension dim_cl_rmt_hitm =3D { .header =3D HEADER_SPAN("----- HITM -----", "Rmt", 1), .name =3D "cl_rmt_hitm", @@ -1376,6 +1424,14 @@ static struct c2c_dimension dim_cl_lcl_hitm =3D { .width =3D 7, }; =20 +static struct c2c_dimension dim_cl_ld_peer =3D { + .header =3D HEADER_BOTH("Snoop", "Peer"), + .name =3D "cl_ld_peer", + .cmp =3D ld_peer_cmp, + .entry =3D ld_peer_entry, + .width =3D 7, +}; + static struct c2c_dimension dim_tot_stores =3D { .header =3D HEADER_BOTH("Total", "Stores"), .name =3D "tot_stores", @@ -1520,6 +1576,15 @@ static struct c2c_dimension dim_percent_lcl_hitm =3D= { .width =3D 7, }; =20 +static struct c2c_dimension dim_percent_ld_peer =3D { + .header =3D HEADER_BOTH("Snoop", "Peer"), + .name =3D "percent_ld_peer", + .cmp =3D percent_ld_peer_cmp, + .entry =3D percent_ld_peer_entry, + .color =3D percent_ld_peer_color, + .width =3D 7, +}; + static struct c2c_dimension dim_percent_stores_l1hit =3D { .header =3D HEADER_SPAN("------- Store Refs ------", "L1 Hit", 2), .name =3D "percent_stores_l1hit", @@ -1602,7 +1667,7 @@ static struct c2c_dimension dim_node =3D { }; =20 static struct c2c_dimension dim_mean_rmt =3D { - .header =3D HEADER_SPAN("---------- cycles ----------", "rmt hitm", 2), + .header =3D HEADER_SPAN("--------------- cycles ---------------", "rmt h= itm", 3), .name =3D "mean_rmt", .cmp =3D empty_cmp, .entry =3D mean_rmt_entry, @@ -1625,6 +1690,14 @@ static struct c2c_dimension dim_mean_load =3D { .width =3D 8, }; =20 +static struct c2c_dimension dim_mean_peer =3D { + .header =3D HEADER_SPAN_LOW("peer"), + .name =3D "mean_peer", + .cmp =3D empty_cmp, + .entry =3D mean_peer_entry, + .width =3D 8, +}; + static struct c2c_dimension dim_cpucnt =3D { .header =3D HEADER_BOTH("cpu", "cnt"), .name =3D "cpucnt", @@ -1672,8 +1745,10 @@ static struct c2c_dimension *dimensions[] =3D { &dim_tot_hitm, &dim_lcl_hitm, &dim_rmt_hitm, + &dim_ld_peer, &dim_cl_lcl_hitm, &dim_cl_rmt_hitm, + &dim_cl_ld_peer, &dim_tot_stores, &dim_stores_l1hit, &dim_stores_l1miss, @@ -1691,6 +1766,7 @@ static struct c2c_dimension *dimensions[] =3D { &dim_percent_hitm, &dim_percent_rmt_hitm, &dim_percent_lcl_hitm, + &dim_percent_ld_peer, &dim_percent_stores_l1hit, &dim_percent_stores_l1miss, &dim_percent_stores_na, @@ -1704,6 +1780,7 @@ static struct c2c_dimension *dimensions[] =3D { &dim_mean_rmt, &dim_mean_lcl, &dim_mean_load, + &dim_mean_peer, &dim_cpucnt, &dim_srcline, &dim_dcacheline_idx, @@ -2192,6 +2269,7 @@ static void print_c2c__display_stats(FILE *out) fprintf(out, " Load L1D hit : %10d\n", stats->ld_l1= hit); fprintf(out, " Load L2D hit : %10d\n", stats->ld_l2= hit); fprintf(out, " Load LLC hit : %10d\n", stats->ld_ll= chit + stats->lcl_hitm); + fprintf(out, " Load HIT Peer : %10d\n", stats->ld_pe= er); fprintf(out, " Load Local HITM : %10d\n", stats->lcl_h= itm); fprintf(out, " Load Remote HITM : %10d\n", stats->rmt_h= itm); fprintf(out, " Load Remote HIT : %10d\n", stats->rmt_h= it); @@ -2229,6 +2307,7 @@ static void print_shared_cacheline_info(FILE *out) fprintf(out, " Fill Buffer Hits on shared lines : %10d\n", stats->ld_fb= hit); fprintf(out, " L1D hits on shared lines : %10d\n", stats->ld_l1= hit); fprintf(out, " L2D hits on shared lines : %10d\n", stats->ld_l2= hit); + fprintf(out, " Load HITs on peer cache lines : %10d\n", stats->ld_pe= er); fprintf(out, " LLC hits on shared lines : %10d\n", stats->ld_ll= chit + stats->lcl_hitm); fprintf(out, " Locked Access on shared lines : %10d\n", stats->locks= ); fprintf(out, " Blocked Access on shared lines : %10d\n", stats->blk_d= ata + stats->blk_addr); @@ -2257,10 +2336,10 @@ static void print_cacheline(struct c2c_hists *c2c_h= ists, fprintf(out, "\n"); } =20 - fprintf(out, " ---------------------------------------------------------= -------------\n"); + fprintf(out, " ---------------------------------------------------------= ----------------------\n"); __hist_entry__snprintf(he_cl, &hpp, hpp_list); fprintf(out, "%s\n", bf); - fprintf(out, " ---------------------------------------------------------= -------------\n"); + fprintf(out, " ---------------------------------------------------------= ----------------------\n"); =20 hists__fprintf(&c2c_hists->hists, false, 0, 0, 0, out, false); } @@ -2275,6 +2354,7 @@ static void print_pareto(FILE *out) cl_output =3D "cl_num," "cl_rmt_hitm," "cl_lcl_hitm," + "cl_ld_peer," "cl_stores_l1hit," "cl_stores_l1miss," "cl_stores_na," @@ -2727,6 +2807,7 @@ static int build_cl_output(char *cl_sort, bool no_sou= rce) c2c.use_stdio ? "cl_num_empty," : "", "percent_rmt_hitm," "percent_lcl_hitm," + "percent_ld_peer," "percent_stores_l1hit," "percent_stores_l1miss," "percent_stores_na," @@ -2737,6 +2818,7 @@ static int build_cl_output(char *cl_sort, bool no_sou= rce) "mean_rmt," "mean_lcl," "mean_load," + "mean_peer," "tot_recs," "cpucnt,", add_sym ? "symbol," : "", @@ -2913,6 +2995,7 @@ static int perf_c2c__report(int argc, const char **ar= gv) "dcacheline_count," "percent_hitm," "tot_hitm,lcl_hitm,rmt_hitm," + "ld_peer," "tot_recs," "tot_loads," "tot_stores," --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFF9CC433F5 for ; Sun, 8 May 2022 09:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232649AbiEHJ33 (ORCPT ); Sun, 8 May 2022 05:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233328AbiEHJ3C (ORCPT ); Sun, 8 May 2022 05:29:02 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43043E019 for ; Sun, 8 May 2022 02:25:13 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id v11so9872644pff.6 for ; Sun, 08 May 2022 02:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OU6pd7Lt5oEt5wQwCFS/HKNGGyS7IdmjRp7WJd3VCBc=; b=VYzAF5l8qRONudNoXTyyFhGy2XU3HjJxX3qp8CjpbWOCT2IPYWpcvvhZF6tbChhEwY M0jKhE9EwSZMWQfMbvz94GyB9ij1vVR31af+M1PecOl8YEYuTQ5K3C+QkQVNm+RLBKnZ p5AQ5O38clalATtODtnQaw55MF5CmTy7ZnBJpGvABD5YMMP22nZ2iSbsgQAmeIsl/S8c rAuZX1qsUNXW+wsh9BplsYeL53DYHgPUCe82bzjo0cBjP/XWGu/jy1/f5/GIMZnorzlc oqAHLohWmN0NMpFivSIjteroUTobmY3QMy27V+omI0BDtezhgtZCH/JTUI7B1KyH9EOw 2EZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OU6pd7Lt5oEt5wQwCFS/HKNGGyS7IdmjRp7WJd3VCBc=; b=t/1bDqFQKf02N8gUj9PxHpSsRQMAECBxsPWPV7VpbsrJ8hIRVgxFLaLuSG2j/hO0S9 GK0i/zXNE6Fijy0MKlw6uW0eEgeAVCgDgcllya6IM3fakxpkJK3ft2O4P9S0NlLjSZF6 SgsBH0xUTaWYuFrMqXubeTScPzUdOybK04kj89iN75vKxCjUjEcfDVzQC/pXp5uZkW2Q rn45gvq//vRyl5u98xi9kXdGtlbD2knhFACoMylAx0vBv3I6J47ZgL7JLgYDra96H5U5 RQqcomOIp41Cg3rfVXajcENvaALr9jEmFAV55TBxWloPlmYHbGq/ykRWv+ZDdrnlRoLr UwAQ== X-Gm-Message-State: AOAM5319M9sBFhqRwMK9USLlBih0pfsmRU1HJk6Q1WJGte/Yjm1TqNbd 7qDeqsFTkH40EoF1IvgJApLRUDkFelgRVSyy2Go= X-Google-Smtp-Source: ABdhPJxYqLiPKaLWN09mBoe00Vgc7c3NuWoEV7CefgVwsrzN0PVqkEg03n3NtbU2BsytbS1yNk2R5w== X-Received: by 2002:a05:6a00:88f:b0:510:7a49:b72f with SMTP id q15-20020a056a00088f00b005107a49b72fmr10682181pfj.21.1652001912589; Sun, 08 May 2022 02:25:12 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:25:12 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 06/11] perf c2c: Use explicit names for display macros Date: Sun, 8 May 2022 17:23:41 +0800 Message-Id: <20220508092346.255826-7-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Perf c2c tool has an assumption that it heavily depends on HITM snoop type to detect cache false sharing, unfortunately, HITM is not supported on some architectures. Essentially, perf c2c tool wants to find some very costly snooping operations for false cache sharing, this means it's not necessarily to stick using HITM tags and we can explore other snooping types (e.g. SNOOPX_PEER). For this reason, this patch renames HITM related display macros with suffix '_HITM', so it can be distinct if later add more display types for on other snooping type. Signed-off-by: Leo Yan Tested-by: Ali Saidi --- tools/perf/builtin-c2c.c | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index baa003c150b1..180208a4085f 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -114,16 +114,16 @@ struct perf_c2c { }; =20 enum { - DISPLAY_LCL, - DISPLAY_RMT, - DISPLAY_TOT, + DISPLAY_LCL_HITM, + DISPLAY_RMT_HITM, + DISPLAY_TOT_HITM, DISPLAY_MAX, }; =20 static const char *display_str[DISPLAY_MAX] =3D { - [DISPLAY_LCL] =3D "Local", - [DISPLAY_RMT] =3D "Remote", - [DISPLAY_TOT] =3D "Total", + [DISPLAY_LCL_HITM] =3D "Local", + [DISPLAY_RMT_HITM] =3D "Remote", + [DISPLAY_TOT_HITM] =3D "Total", }; =20 static const struct option c2c_options[] =3D { @@ -807,15 +807,15 @@ static double percent_hitm(struct c2c_hist_entry *c2c= _he) total =3D &hists->stats; =20 switch (c2c.display) { - case DISPLAY_RMT: + case DISPLAY_RMT_HITM: st =3D stats->rmt_hitm; tot =3D total->rmt_hitm; break; - case DISPLAY_LCL: + case DISPLAY_LCL_HITM: st =3D stats->lcl_hitm; tot =3D total->lcl_hitm; break; - case DISPLAY_TOT: + case DISPLAY_TOT_HITM: st =3D stats->tot_hitm; tot =3D total->tot_hitm; default: @@ -1181,15 +1181,15 @@ node_entry(struct perf_hpp_fmt *fmt __maybe_unused,= struct perf_hpp *hpp, advance_hpp(hpp, ret); =20 switch (c2c.display) { - case DISPLAY_RMT: + case DISPLAY_RMT_HITM: ret =3D display_metrics(hpp, stats->rmt_hitm, c2c_he->stats.rmt_hitm); break; - case DISPLAY_LCL: + case DISPLAY_LCL_HITM: ret =3D display_metrics(hpp, stats->lcl_hitm, c2c_he->stats.lcl_hitm); break; - case DISPLAY_TOT: + case DISPLAY_TOT_HITM: ret =3D display_metrics(hpp, stats->tot_hitm, c2c_he->stats.tot_hitm); break; @@ -1545,9 +1545,9 @@ static struct c2c_dimension dim_tot_loads =3D { }; =20 static struct c2c_header percent_hitm_header[] =3D { - [DISPLAY_LCL] =3D HEADER_BOTH("Lcl", "Hitm"), - [DISPLAY_RMT] =3D HEADER_BOTH("Rmt", "Hitm"), - [DISPLAY_TOT] =3D HEADER_BOTH("Tot", "Hitm"), + [DISPLAY_LCL_HITM] =3D HEADER_BOTH("Lcl", "Hitm"), + [DISPLAY_RMT_HITM] =3D HEADER_BOTH("Rmt", "Hitm"), + [DISPLAY_TOT_HITM] =3D HEADER_BOTH("Tot", "Hitm"), }; =20 static struct c2c_dimension dim_percent_hitm =3D { @@ -2018,15 +2018,15 @@ static bool he__display(struct hist_entry *he, stru= ct c2c_stats *stats) c2c_he =3D container_of(he, struct c2c_hist_entry, he); =20 switch (c2c.display) { - case DISPLAY_LCL: + case DISPLAY_LCL_HITM: he->filtered =3D filter_display(c2c_he->stats.lcl_hitm, stats->lcl_hitm); break; - case DISPLAY_RMT: + case DISPLAY_RMT_HITM: he->filtered =3D filter_display(c2c_he->stats.rmt_hitm, stats->rmt_hitm); break; - case DISPLAY_TOT: + case DISPLAY_TOT_HITM: he->filtered =3D filter_display(c2c_he->stats.tot_hitm, stats->tot_hitm); break; @@ -2049,13 +2049,13 @@ static inline bool is_valid_hist_entry(struct hist_= entry *he) return true; =20 switch (c2c.display) { - case DISPLAY_LCL: + case DISPLAY_LCL_HITM: has_record =3D !!c2c_he->stats.lcl_hitm; break; - case DISPLAY_RMT: + case DISPLAY_RMT_HITM: has_record =3D !!c2c_he->stats.rmt_hitm; break; - case DISPLAY_TOT: + case DISPLAY_TOT_HITM: has_record =3D !!c2c_he->stats.tot_hitm; break; default: @@ -2752,11 +2752,11 @@ static int setup_display(const char *str) const char *display =3D str ?: "tot"; =20 if (!strcmp(display, "tot")) - c2c.display =3D DISPLAY_TOT; + c2c.display =3D DISPLAY_TOT_HITM; else if (!strcmp(display, "rmt")) - c2c.display =3D DISPLAY_RMT; + c2c.display =3D DISPLAY_RMT_HITM; else if (!strcmp(display, "lcl")) - c2c.display =3D DISPLAY_LCL; + c2c.display =3D DISPLAY_LCL_HITM; else { pr_err("failed: unknown display type: %s\n", str); return -1; @@ -2846,9 +2846,9 @@ static int setup_coalesce(const char *coalesce, bool = no_source) return -1; =20 if (asprintf(&c2c.cl_resort, "offset,%s", - c2c.display =3D=3D DISPLAY_TOT ? + c2c.display =3D=3D DISPLAY_TOT_HITM ? "tot_hitm" : - c2c.display =3D=3D DISPLAY_RMT ? + c2c.display =3D=3D DISPLAY_RMT_HITM ? "rmt_hitm,lcl_hitm" : "lcl_hitm,rmt_hitm") < 0) return -ENOMEM; @@ -3005,11 +3005,11 @@ static int perf_c2c__report(int argc, const char **= argv) "ld_rmthit,rmt_hitm," "dram_lcl,dram_rmt"; =20 - if (c2c.display =3D=3D DISPLAY_TOT) + if (c2c.display =3D=3D DISPLAY_TOT_HITM) sort_str =3D "tot_hitm"; - else if (c2c.display =3D=3D DISPLAY_RMT) + else if (c2c.display =3D=3D DISPLAY_RMT_HITM) sort_str =3D "rmt_hitm"; - else if (c2c.display =3D=3D DISPLAY_LCL) + else if (c2c.display =3D=3D DISPLAY_LCL_HITM) sort_str =3D "lcl_hitm"; =20 c2c_hists__reinit(&c2c.hists, output_str, sort_str); --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55B95C433EF for ; Sun, 8 May 2022 09:25:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233183AbiEHJ3d (ORCPT ); Sun, 8 May 2022 05:29:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238490AbiEHJ3N (ORCPT ); Sun, 8 May 2022 05:29:13 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DCBDE018 for ; Sun, 8 May 2022 02:25:23 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id bo5so9861444pfb.4 for ; Sun, 08 May 2022 02:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eUGLoaJd3B+TtNu4b8kB3fkRxS/7EQl4VGMpMCSV3Jc=; b=WcsX1Z9JcIs+2mCuBtKVYji34LP/dT9i3R1idr1sUXRNJ9K+X++C8Sjl9mL8UbnUii CigGlzLmEtYk/4yFMQjo3mccYBhlj76aqiP8tdbgYtPb7RPT/PIrwMu22q48fqrOL80j dbnP/S11EPibLBVpJym5ahAFCbwh7f4PVb43L+8Ekl6gg7F7SBCLbJVVgO6fnP/T8Cid H0AiB1Ri3I0nC1izG1lGgjeG+OnaLUJF+cPAz0iit5YbVVMuNKBSnHlSxc4NOmsEme2Q fUO0qDUX9ANXfiF975UZx1LukOByflPmNNRhShEENC71z74qyezRrrj5XNKs+vLXMcEY lXOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eUGLoaJd3B+TtNu4b8kB3fkRxS/7EQl4VGMpMCSV3Jc=; b=Hdr2QK7dsO9LSNMqHNh7/FRHtDRzMITFvSpZro9DNow7moS+QQsNYH+Wu/V7aSqe4Q G/jun2Pi8523CKQdadgbTlZO31UJxU5zPI2nYiiOMjlrNzXriLhUaFFNn4zcq8kaAaK6 FaDu9/wvigZnJRI3sXAXPoLKIZ6vMNm6WL7BqBxt8yeNdjpYrCdlt6NrGTGDGLd594Cw 4/rYHHvsnySbgA1VVuOqno4Zl4ASst9gTLk4d4bcX2t519ad8lD2TllMOWaG6h2SYfkD LsBclYYdZscFhmrVApJ4Ur90QjkInWIPMbJw3Zog4gE1WuQ9Q7eabSFeV6Sd3a9A8fTS 06kw== X-Gm-Message-State: AOAM533OkjK7S7k22B746YJlsA2al6ZF86VbV1gOjNs4wxBxzJs+bhA/ QLjszB1Hn6uYkG+1eCmORhWFuQ== X-Google-Smtp-Source: ABdhPJwCPH/k/zt3g/jrNWG8ycYHnRc7fh3h5PiX/79iqwYBimO1ycFpR5t4XPtcqlzjeLUPvYHjjQ== X-Received: by 2002:a05:6a00:4385:b0:510:4422:aa3a with SMTP id bt5-20020a056a00438500b005104422aa3amr11139190pfb.16.1652001922968; Sun, 08 May 2022 02:25:22 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.25.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:25:22 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 07/11] perf c2c: Rename dimension from 'percent_hitm' to 'percent_costly_snoop' Date: Sun, 8 May 2022 17:23:42 +0800 Message-Id: <20220508092346.255826-8-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use more general naming for the main sort dimension, this can allow us not to sort only on HITM snoop type, so it can be extended to support other costly snooping operations. So rename the dimension to the prefix 'percent_costly_". Signed-off-by: Leo Yan Tested-by: Ali Saidi --- tools/perf/builtin-c2c.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 180208a4085f..1e1565e5d396 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -794,7 +794,7 @@ percent_color(struct perf_hpp_fmt *fmt, struct perf_hpp= *hpp, return hpp_color_scnprintf(hpp, "%*.2f%%", width - 1, per); } =20 -static double percent_hitm(struct c2c_hist_entry *c2c_he) +static double percent_costly_snoop(struct c2c_hist_entry *c2c_he) { struct c2c_hists *hists; struct c2c_stats *stats; @@ -834,8 +834,8 @@ static double percent_hitm(struct c2c_hist_entry *c2c_h= e) }) =20 static int -percent_hitm_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, - struct hist_entry *he) +percent_costly_snoop_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, + struct hist_entry *he) { struct c2c_hist_entry *c2c_he; int width =3D c2c_width(fmt, hpp, he->hists); @@ -843,20 +843,20 @@ percent_hitm_entry(struct perf_hpp_fmt *fmt, struct p= erf_hpp *hpp, double per; =20 c2c_he =3D container_of(he, struct c2c_hist_entry, he); - per =3D percent_hitm(c2c_he); + per =3D percent_costly_snoop(c2c_he); return scnprintf(hpp->buf, hpp->size, "%*s", width, PERC_STR(buf, per)); } =20 static int -percent_hitm_color(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, - struct hist_entry *he) +percent_costly_snoop_color(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, + struct hist_entry *he) { - return percent_color(fmt, hpp, he, percent_hitm); + return percent_color(fmt, hpp, he, percent_costly_snoop); } =20 static int64_t -percent_hitm_cmp(struct perf_hpp_fmt *fmt __maybe_unused, - struct hist_entry *left, struct hist_entry *right) +percent_costly_snoop_cmp(struct perf_hpp_fmt *fmt __maybe_unused, + struct hist_entry *left, struct hist_entry *right) { struct c2c_hist_entry *c2c_left; struct c2c_hist_entry *c2c_right; @@ -866,8 +866,8 @@ percent_hitm_cmp(struct perf_hpp_fmt *fmt __maybe_unuse= d, c2c_left =3D container_of(left, struct c2c_hist_entry, he); c2c_right =3D container_of(right, struct c2c_hist_entry, he); =20 - per_left =3D percent_hitm(c2c_left); - per_right =3D percent_hitm(c2c_right); + per_left =3D percent_costly_snoop(c2c_left); + per_right =3D percent_costly_snoop(c2c_right); =20 return per_left - per_right; } @@ -1544,17 +1544,17 @@ static struct c2c_dimension dim_tot_loads =3D { .width =3D 7, }; =20 -static struct c2c_header percent_hitm_header[] =3D { +static struct c2c_header percent_costly_snoop_header[] =3D { [DISPLAY_LCL_HITM] =3D HEADER_BOTH("Lcl", "Hitm"), [DISPLAY_RMT_HITM] =3D HEADER_BOTH("Rmt", "Hitm"), [DISPLAY_TOT_HITM] =3D HEADER_BOTH("Tot", "Hitm"), }; =20 -static struct c2c_dimension dim_percent_hitm =3D { - .name =3D "percent_hitm", - .cmp =3D percent_hitm_cmp, - .entry =3D percent_hitm_entry, - .color =3D percent_hitm_color, +static struct c2c_dimension dim_percent_costly_snoop =3D { + .name =3D "percent_costly_snoop", + .cmp =3D percent_costly_snoop_cmp, + .entry =3D percent_costly_snoop_entry, + .color =3D percent_costly_snoop_color, .width =3D 7, }; =20 @@ -1763,7 +1763,7 @@ static struct c2c_dimension *dimensions[] =3D { &dim_ld_rmthit, &dim_tot_recs, &dim_tot_loads, - &dim_percent_hitm, + &dim_percent_costly_snoop, &dim_percent_rmt_hitm, &dim_percent_lcl_hitm, &dim_percent_ld_peer, @@ -2665,7 +2665,7 @@ static int ui_quirks(void) nodestr =3D "CL"; } =20 - dim_percent_hitm.header =3D percent_hitm_header[c2c.display]; + dim_percent_costly_snoop.header =3D percent_costly_snoop_header[c2c.displ= ay]; =20 /* Fix the zero line for dcacheline column. */ buf =3D fill_line("Cacheline", dim_dcacheline.width + @@ -2993,7 +2993,7 @@ static int perf_c2c__report(int argc, const char **ar= gv) "dcacheline," "dcacheline_node," "dcacheline_count," - "percent_hitm," + "percent_costly_snoop," "tot_hitm,lcl_hitm,rmt_hitm," "ld_peer," "tot_recs," --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDA40C433EF for ; Sun, 8 May 2022 09:26:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232851AbiEHJ3r (ORCPT ); Sun, 8 May 2022 05:29:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233167AbiEHJ3b (ORCPT ); Sun, 8 May 2022 05:29:31 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70F211179 for ; Sun, 8 May 2022 02:25:34 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id g184so7173248pgc.1 for ; Sun, 08 May 2022 02:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bmjRmkqfDoOUpRbHbH9T/ypo7ZLWljJQ+MADxCAiDDg=; b=RlanBAIYEgm91wbA7cPRQpYBtqM6dgSI3Omo6TW7eQu17rOGJa1Udyp4fkVS5XyGSG OXjUV6btwYGN3gKeJqaxJ8PjIK0jPh2nLOxHZAH7BYFtA+8LzNqnpi8+0UpGLBD97A5m qjX3AWq9PEqTtM1bEQZWiQ8cJzxXvdU8KqLcRdLeHXTaj0HrPz4uHkOCamFZWbIzVlnk Vz+KDViYs7iDygYOrqrSQMUH3ZFEiBzD5+cRK71zhpeomAcXD+JedXqFPMjOWRkqn7Jn 9kV4SAoA532c5a5oytRcHxxEmPaqEyMDsg+DkffMl7rACs1FTgPQpuD2EZJqMwBgWqlz IQ6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bmjRmkqfDoOUpRbHbH9T/ypo7ZLWljJQ+MADxCAiDDg=; b=nChCnnf4iP4hVaTuUEOoNxAUd58AjJsyNNCWNnCHC32us9o18Y0K7Jb+a8gAuz9nU/ uNrI3U/j1WWGaUPCGhluuXNUOGZ/rTLBV9E3g98/mo0cpHpIywpwRlisHl13XNF0Mc48 lxv9HH7Bypeq9Ix9P9b3n3cWnQhZCF0faLxXH0BB1B+qpc5riOgovx3wPgRU0l4n1YK5 dWay6MquhVBApVihB3ytzjcj/Ax4tYGMwYM55J06B2dZyf+Fg2IWDwt9qRqCBJDf4kB6 J1fDpO7zkxQSR5OYwU4aOjhHAosWsjBtQwPByHoGmwUgGZ3b1uFB6NemH2/qJLr8LLwE 9UFQ== X-Gm-Message-State: AOAM53229VNl1CT/ET7fMPpqg1A67z56cMLdAwAt+3+rK55+L+3LDIT5 WWlbG3MfyIx6seFHYTmtZSWhgQ== X-Google-Smtp-Source: ABdhPJzxDAEpKJE6XYr9T37crKPOq7CmaQRZLLlvIFev06vHXGfHLsSbInljeBNGWnb6qwwYnOhxdQ== X-Received: by 2002:a05:6a00:cc4:b0:50d:e9db:6145 with SMTP id b4-20020a056a000cc400b0050de9db6145mr11046427pfv.56.1652001933348; Sun, 08 May 2022 02:25:33 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.25.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:25:33 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 08/11] perf c2c: Refactor node header Date: Sun, 8 May 2022 17:23:43 +0800 Message-Id: <20220508092346.255826-9-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The node header array contains 3 items, each item is used for one of the 3 flavors for node accessing info. To extend sorting on other snooping type and not always stick to HITMs, the second header string "Node{cpus %hitms %stores}" should be adjusted (e.g. it's changed as "Node{cpus %peer %stores}"). For this reason, this patch changes the node header array to three flat variables and uses switch-case in function setup_nodes_header(), thus it is easier for altering the header string. Signed-off-by: Leo Yan Tested-by: Ali Saidi --- tools/perf/builtin-c2c.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 1e1565e5d396..04f33dc8ca0f 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -1653,12 +1653,6 @@ static struct c2c_dimension dim_dso =3D { .se =3D &sort_dso, }; =20 -static struct c2c_header header_node[3] =3D { - HEADER_LOW("Node"), - HEADER_LOW("Node{cpus %hitms %stores}"), - HEADER_LOW("Node{cpu list}"), -}; - static struct c2c_dimension dim_node =3D { .name =3D "node", .cmp =3D empty_cmp, @@ -2146,9 +2140,27 @@ static int resort_cl_cb(struct hist_entry *he, void = *arg __maybe_unused) return 0; } =20 +static struct c2c_header header_node_0 =3D HEADER_LOW("Node"); +static struct c2c_header header_node_1 =3D HEADER_LOW("Node{cpus %hitms %s= tores}"); +static struct c2c_header header_node_2 =3D HEADER_LOW("Node{cpu list}"); + static void setup_nodes_header(void) { - dim_node.header =3D header_node[c2c.node_info]; + switch (c2c.node_info) { + case 0: + dim_node.header =3D header_node_0; + break; + case 1: + dim_node.header =3D header_node_1; + break; + case 2: + dim_node.header =3D header_node_2; + break; + default: + break; + } + + return; } =20 static int setup_nodes(struct perf_session *session) --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5306AC433F5 for ; Sun, 8 May 2022 09:26:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242418AbiEHJaH (ORCPT ); Sun, 8 May 2022 05:30:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239567AbiEHJ36 (ORCPT ); Sun, 8 May 2022 05:29:58 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B857AE0E5 for ; Sun, 8 May 2022 02:25:44 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id l11so4102904pgt.13 for ; Sun, 08 May 2022 02:25:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SwFqL++LGuGx8rttWDytxUfoqa9BjW9BvDNKxYMsDB0=; b=hBKzaXL4nqoSRx9aqLZiF4x+ohv47BuayuWIuItMRiat/1r5d1I4zvMNsmGqy8kzTV XyQe13Tf8/p1TTDdBpsNLh9G2safLAhwQUxxOx1b/kBilcFYLKBtwmrAdKvU9flXeDMU Xc/II+mBoErQXrQPdS5Z5BgjKyXHgna3eSxs2UGrwGEl1zqO9jWl4aHjcUyPZVWSmoz7 QXdhWJmrNUTFSMSnKlbcY8Go55wfPk3ja6UiTAP9gm4PLXhkArUEyUD6IDl1uEkgVv9F LU2CuwUiRulx0yZz4UNTH4cSg31BPaYB9tUHN4U97IKf6VCn37VuHnDidEtwReRJpxNh hIRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SwFqL++LGuGx8rttWDytxUfoqa9BjW9BvDNKxYMsDB0=; b=ivh2/Z+eRcpAMqhfkcQF231tBEXACkDmhft7mI9C6J+E3+0/ADid5GAG+McR39muvR 48MGBTIM/CWZn70q1xF79uoXMIhm8WVJQQomgLWKP2uot4MJVtjvkXm3IaaCO/ykE8Xn bEIGtWlUX3x9xm1QSuF9jGhrzEWSeWcjDfhLgMEaIrYrJi7xf5J2R4g3vZVuH/2bf/ZG XsSJEyKqsusxRuu1W4wzBNz9HV1sv6/MudtRC71YsKGej2UEwVS2XYvpPefBKmPDIHgY yLifLzVoJrAh2M8vkTbLMPOavkBGWHPn4lPLi44AT7Lm5QYc4tWfMIA5lMRSMDAzy2aq TGyg== X-Gm-Message-State: AOAM5308F7IR0TLHw3VnXOakvi2K8JelunrxWesGsc/YgF90WhbenwKG LSPqiu3rKnHJikwBT4rOQIGiow== X-Google-Smtp-Source: ABdhPJymZiS6mKIa8q2f/7DdoH7tPEFEodI8JyLw6ZHFYO2lK1pbw6Si5Zd0BcMs6FLYHkxiRm3Czw== X-Received: by 2002:a05:6a00:10d3:b0:4fe:5d:75c8 with SMTP id d19-20020a056a0010d300b004fe005d75c8mr11027599pfu.6.1652001943746; Sun, 08 May 2022 02:25:43 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.25.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:25:43 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 09/11] perf c2c: Sort on peer snooping for load operations Date: Sun, 8 May 2022 17:23:44 +0800 Message-Id: <20220508092346.255826-10-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Except the existed three display options 'tot', 'rmt', 'lcl', this patch adds a new option 'peer' so can sort on the cache hit for peer snooping. For displaying with option 'peer', the "Shared Data Cache Line Table" and "Shared Cache Line Distribution Pareto" both sort with the metrics "ld_peer". As result, we can get the 'peer' display as below: # perf c2c report -d peer --coalesce tid,pid,iaddr,dso -N --stdio [...] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Shared Data Cache Line Table =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # # ----------- Cacheline ---------- Snoop ------- Load Hitm ---= ---- Snoop Total Total Total --------- Stores -------- ----- = Core Load Hit ----- - LLC Load Hit -- - RMT Load Hit -- --- Load Dram --= -- # Index Address Node PA cnt Peer Total LclHitm Rmt= Hitm Peer records Loads Stores L1Hit L1Miss N/A F= B L1 L2 LclHit LclHitm RmtHit RmtHitm Lcl R= mt # ..... .................. .... ...... ....... ....... ....... ...= .... ....... ....... ....... ....... ....... ....... ....... ......= . ....... ....... ........ ....... ........ ....... ........ ......= .. # 0 0xaaaac17d6000 N/A 0 100.00% 0 0 = 0 99 18851 18851 0 0 0 0 = 0 18752 0 0 0 0 0 0 = 0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Shared Cache Line Distribution Pareto =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # # ----- HITM ----- Snoop ------- Store Refs ------ --------- = Data address --------- ---= ------------ cycles --------------- Total cpu = Shared # Num RmtHitm LclHitm Peer L1 Hit L1 Miss N/A = Offset Node PA cnt Pid Tid Code address rmt= hitm lcl hitm load peer records cnt Sym= bol Object Source:Line Node{cpus %peers %stores} # ..... ....... ....... ....... ....... ....... ....... ..........= ........ .... ...... ....... ................. .................. ...= ..... ........ ........ ........ ....... ........ ...................= ... ................ ............... .... # -----------------------------------------------------------------------= -------- 0 0 0 99 0 0 0 0xaaaa= c17d6000 -----------------------------------------------------------------------= -------- 0.00% 0.00% 3.03% 0.00% 0.00% 0.00% = 0x20 N/A 0 3603 3603:memstress 0xaaaac17c25ac = 0 0 41 376 9314 2 [.] 0x0000000000002= 5ac memstress memstress[25ac] 0{ 2 100.0% n/a} 0.00% 0.00% 3.03% 0.00% 0.00% 0.00% = 0x20 N/A 0 3603 3606:memstress 0xaaaac17c25ac = 0 0 44 375 9155 1 [.] 0x0000000000002= 5ac memstress memstress[25ac] 0{ 1 100.0% n/a} 0.00% 0.00% 45.45% 0.00% 0.00% 0.00% = 0x29 N/A 0 3603 3603:memstress 0xaaaac17c3e88 = 0 0 175 180 70 2 [.] 0x0000000000003= e88 memstress memstress[3e88] 0{ 2 100.0% n/a} 0.00% 0.00% 48.48% 0.00% 0.00% 0.00% = 0x29 N/A 0 3603 3606:memstress 0xaaaac17c3e88 = 0 0 170 180 65 1 [.] 0x0000000000003= e88 memstress memstress[3e88] 0{ 1 100.0% n/a} [...] Signed-off-by: Leo Yan Tested-by: Ali Saidi --- tools/perf/builtin-c2c.c | 63 +++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 04f33dc8ca0f..9b6d2a9553e1 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -117,13 +117,15 @@ enum { DISPLAY_LCL_HITM, DISPLAY_RMT_HITM, DISPLAY_TOT_HITM, + DISPLAY_SNP_PEER, DISPLAY_MAX, }; =20 static const char *display_str[DISPLAY_MAX] =3D { - [DISPLAY_LCL_HITM] =3D "Local", - [DISPLAY_RMT_HITM] =3D "Remote", - [DISPLAY_TOT_HITM] =3D "Total", + [DISPLAY_LCL_HITM] =3D "Local HITMs", + [DISPLAY_RMT_HITM] =3D "Remote HITMs", + [DISPLAY_TOT_HITM] =3D "Total HITMs", + [DISPLAY_SNP_PEER] =3D "Snoop Peers", }; =20 static const struct option c2c_options[] =3D { @@ -818,6 +820,11 @@ static double percent_costly_snoop(struct c2c_hist_ent= ry *c2c_he) case DISPLAY_TOT_HITM: st =3D stats->tot_hitm; tot =3D total->tot_hitm; + break; + case DISPLAY_SNP_PEER: + st =3D stats->ld_peer; + tot =3D total->ld_peer; + break; default: break; } @@ -1193,6 +1200,10 @@ node_entry(struct perf_hpp_fmt *fmt __maybe_unused, = struct perf_hpp *hpp, ret =3D display_metrics(hpp, stats->tot_hitm, c2c_he->stats.tot_hitm); break; + case DISPLAY_SNP_PEER: + ret =3D display_metrics(hpp, stats->ld_peer, + c2c_he->stats.ld_peer); + break; default: break; } @@ -1548,6 +1559,7 @@ static struct c2c_header percent_costly_snoop_header[= ] =3D { [DISPLAY_LCL_HITM] =3D HEADER_BOTH("Lcl", "Hitm"), [DISPLAY_RMT_HITM] =3D HEADER_BOTH("Rmt", "Hitm"), [DISPLAY_TOT_HITM] =3D HEADER_BOTH("Tot", "Hitm"), + [DISPLAY_SNP_PEER] =3D HEADER_BOTH("Snoop", "Peer"), }; =20 static struct c2c_dimension dim_percent_costly_snoop =3D { @@ -2024,6 +2036,10 @@ static bool he__display(struct hist_entry *he, struc= t c2c_stats *stats) he->filtered =3D filter_display(c2c_he->stats.tot_hitm, stats->tot_hitm); break; + case DISPLAY_SNP_PEER: + he->filtered =3D filter_display(c2c_he->stats.ld_peer, + stats->ld_peer); + break; default: break; } @@ -2052,6 +2068,8 @@ static inline bool is_valid_hist_entry(struct hist_en= try *he) case DISPLAY_TOT_HITM: has_record =3D !!c2c_he->stats.tot_hitm; break; + case DISPLAY_SNP_PEER: + has_record =3D !!c2c_he->stats.ld_peer; default: break; } @@ -2141,7 +2159,10 @@ static int resort_cl_cb(struct hist_entry *he, void = *arg __maybe_unused) } =20 static struct c2c_header header_node_0 =3D HEADER_LOW("Node"); -static struct c2c_header header_node_1 =3D HEADER_LOW("Node{cpus %hitms %s= tores}"); +static struct c2c_header header_node_1_hitms_stores =3D + HEADER_LOW("Node{cpus %hitms %stores}"); +static struct c2c_header header_node_1_peers_stores =3D + HEADER_LOW("Node{cpus %peers %stores}"); static struct c2c_header header_node_2 =3D HEADER_LOW("Node{cpu list}"); =20 static void setup_nodes_header(void) @@ -2151,7 +2172,10 @@ static void setup_nodes_header(void) dim_node.header =3D header_node_0; break; case 1: - dim_node.header =3D header_node_1; + if (c2c.display =3D=3D DISPLAY_SNP_PEER) + dim_node.header =3D header_node_1_peers_stores; + else + dim_node.header =3D header_node_1_hitms_stores; break; case 2: dim_node.header =3D header_node_2; @@ -2225,13 +2249,15 @@ static int setup_nodes(struct perf_session *session) } =20 #define HAS_HITMS(__h) ((__h)->stats.lcl_hitm || (__h)->stats.rmt_hitm) +#define HAS_PEER(__h) ((__h)->stats.ld_peer) =20 static int resort_shared_cl_cb(struct hist_entry *he, void *arg __maybe_un= used) { struct c2c_hist_entry *c2c_he; c2c_he =3D container_of(he, struct c2c_hist_entry, he); =20 - if (HAS_HITMS(c2c_he)) { + if ((c2c.display !=3D DISPLAY_SNP_PEER && HAS_HITMS(c2c_he)) || + (c2c.display =3D=3D DISPLAY_SNP_PEER && HAS_PEER(c2c_he))) { c2c.shared_clines++; c2c_add_stats(&c2c.shared_clines_stats, &c2c_he->stats); } @@ -2406,7 +2432,7 @@ static void print_c2c_info(FILE *out, struct perf_ses= sion *session) fprintf(out, "%-36s: %s\n", first ? " Events" : "", evsel__name(evsel)); first =3D false; } - fprintf(out, " Cachelines sort on : %s HITMs\n", + fprintf(out, " Cachelines sort on : %s\n", display_str[c2c.display]); fprintf(out, " Cacheline data grouping : %s\n", c2c.cl_sort); } @@ -2563,7 +2589,7 @@ static int perf_c2c_browser__title(struct hist_browse= r *browser, { scnprintf(bf, size, "Shared Data Cache Line Table " - "(%lu entries, sorted on %s HITMs)", + "(%lu entries, sorted on %s)", browser->nr_non_filtered_entries, display_str[c2c.display]); return 0; @@ -2769,6 +2795,8 @@ static int setup_display(const char *str) c2c.display =3D DISPLAY_RMT_HITM; else if (!strcmp(display, "lcl")) c2c.display =3D DISPLAY_LCL_HITM; + else if (!strcmp(display, "peer")) + c2c.display =3D DISPLAY_SNP_PEER; else { pr_err("failed: unknown display type: %s\n", str); return -1; @@ -2850,6 +2878,7 @@ static int build_cl_output(char *cl_sort, bool no_sou= rce) static int setup_coalesce(const char *coalesce, bool no_source) { const char *c =3D coalesce ?: coalesce_default; + const char *sort_str =3D NULL; =20 if (asprintf(&c2c.cl_sort, "offset,%s", c) < 0) return -ENOMEM; @@ -2857,12 +2886,16 @@ static int setup_coalesce(const char *coalesce, boo= l no_source) if (build_cl_output(c2c.cl_sort, no_source)) return -1; =20 - if (asprintf(&c2c.cl_resort, "offset,%s", - c2c.display =3D=3D DISPLAY_TOT_HITM ? - "tot_hitm" : - c2c.display =3D=3D DISPLAY_RMT_HITM ? - "rmt_hitm,lcl_hitm" : - "lcl_hitm,rmt_hitm") < 0) + if (c2c.display =3D=3D DISPLAY_TOT_HITM) + sort_str =3D "tot_hitm"; + else if (c2c.display =3D=3D DISPLAY_RMT_HITM) + sort_str =3D "rmt_hitm,lcl_hitm"; + else if (c2c.display =3D=3D DISPLAY_LCL_HITM) + sort_str =3D "lcl_hitm,rmt_hitm"; + else if (c2c.display =3D=3D DISPLAY_SNP_PEER) + sort_str =3D "ld_peer"; + + if (asprintf(&c2c.cl_resort, "offset,%s", sort_str) < 0) return -ENOMEM; =20 pr_debug("coalesce sort fields: %s\n", c2c.cl_sort); @@ -3023,6 +3056,8 @@ static int perf_c2c__report(int argc, const char **ar= gv) sort_str =3D "rmt_hitm"; else if (c2c.display =3D=3D DISPLAY_LCL_HITM) sort_str =3D "lcl_hitm"; + else if (c2c.display =3D=3D DISPLAY_SNP_PEER) + sort_str =3D "ld_peer"; =20 c2c_hists__reinit(&c2c.hists, output_str, sort_str); =20 --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D54BC433FE for ; Sun, 8 May 2022 09:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238826AbiEHJaX (ORCPT ); Sun, 8 May 2022 05:30:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232982AbiEHJaB (ORCPT ); Sun, 8 May 2022 05:30:01 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0636AE42 for ; Sun, 8 May 2022 02:25:54 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id cq17-20020a17090af99100b001dc0386cd8fso10408605pjb.5 for ; Sun, 08 May 2022 02:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pA8VGKLqfC1iE6+6bQ/jXfFhVZ9BK9x1Q5PgdGMEwUw=; b=o1kaOjdAJXoA13wgpRDroI+Fl8hHKaQs8EhTo0Yqb7MGBx3xgv0bq0MaA0WYAINjvy d0ecuNyvqQUFk9BwrUWfyaRVDgcFZEXDAr8+ioN8A1h7BTEGumwApLqPI+LqNpexhxtm 4n7J2YAzfOYzL/6rpES13/6ZVJFmMTuU3xu+Lx9RjNwmY/MnWLgdFPRJt6LO8s+TthXE sb/hg9cvw4QIq0ke0WFfpVu6qBk0cOF7PWXftlL8kPqKck1kwe8AKbd4zbdEQpfzUvik hyWX64JrYWKCImRlljyFN5r06WXO1oLkNlZyCE560hCYy4nzm9nLM1mINYTPvmTIsP9u z6tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pA8VGKLqfC1iE6+6bQ/jXfFhVZ9BK9x1Q5PgdGMEwUw=; b=4UPpoNCoCuEUUh2Hp1m7rJUfU1TMhP6HhlbgZJjD6iQRx5NBGElc4DmW2cMN7KM2KW eBtqmLnGVUPoVls2SrSdJx427fBDGFNLiwqn7dJ4RfQokPJGDQ4kHwE2cHeeC6Gg2BFb lsZwS6HWsczGEckuEYYdtc3fn1R06c1UCL70Zq4pBj3f/Xg+gKSRNnzrZHJEdtS1jLs2 QDNtr0qA47Ipqf5uag35Bfl3o+pj7IsJX+3pEI1S8JonApixzjoU1Hv4uR5cshSd6Lwy MX6EkN0Qx/I12dmykWt6IStlBe8Yz6rsiuRYTU+GWXOaZUBDUKc1G51+Z/+Yb9pB02Y5 z/SA== X-Gm-Message-State: AOAM532R3CKI+7uDQ7AvL3kuw8ZruB+fd7ZjWwy6nCs/JkX5+f/5pJ8o a/kxb4Yeb5s6EncT1RFxAG+gpw== X-Google-Smtp-Source: ABdhPJwui8DZgaze6hcC7r2eMntLFZnk7YtY0J3c/fZHAndBTbFAsu+eMqOuEbIA9rE2ygup7hbe5w== X-Received: by 2002:a17:903:41c9:b0:15e:b449:ce9a with SMTP id u9-20020a17090341c900b0015eb449ce9amr11289572ple.136.1652001954095; Sun, 08 May 2022 02:25:54 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.25.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:25:53 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 10/11] perf c2c: Update documentation for new display option 'peer' Date: Sun, 8 May 2022 17:23:45 +0800 Message-Id: <20220508092346.255826-11-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since the new display option 'peer' is introduced, this patch is to update the documentation to reflect it. Signed-off-by: Leo Yan Tested-by: Ali Saidi --- tools/perf/Documentation/perf-c2c.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tools/perf/Documentation/perf-c2c.txt b/tools/perf/Documentati= on/perf-c2c.txt index 6f69173731aa..cc98a7e774f6 100644 --- a/tools/perf/Documentation/perf-c2c.txt +++ b/tools/perf/Documentation/perf-c2c.txt @@ -109,7 +109,8 @@ REPORT OPTIONS =20 -d:: --display:: - Switch to HITM type (rmt, lcl) to display and sort on. Total HITMs as def= ault. + Switch to HITM type (rmt, lcl) or peer snooping type (peer) to display + and sort on. Total HITMs (tot) as default. =20 --stitch-lbr:: Show callgraph with stitched LBRs, which may have more complete @@ -174,12 +175,18 @@ For each cacheline in the 1) list we display followin= g data: Cacheline - cacheline address (hex number) =20 - Rmt/Lcl Hitm + Rmt/Lcl Hitm (For display with HITM types) - cacheline percentage of all Remote/Local HITM accesses =20 + Snoop Peer (For display with peer type) + - cacheline percentage of peer access + LLC Load Hitm - Total, LclHitm, RmtHitm - count of Total/Local/Remote load HITMs =20 + Snoop Peer + - count of peer access + Total records - sum of all cachelines accesses =20 @@ -211,6 +218,9 @@ For each offset in the 2) list we display following dat= a: HITM - Rmt, Lcl - % of Remote/Local HITM accesses for given offset within cacheline =20 + Snoop Peer + - % of peer accesses for given offset within cacheline + Store Refs - L1 Hit, L1 Miss, N/A - % of store accesses that hit L1, missed L1 and N/A (no available) memo= ry level for given offset within cacheline @@ -227,8 +237,9 @@ For each offset in the 2) list we display following dat= a: Code address - code address responsible for the accesses =20 - cycles - rmt hitm, lcl hitm, load - - sum of cycles for given accesses - Remote/Local HITM and generic load + cycles - rmt hitm, lcl hitm, load, peer + - sum of cycles for given accesses - Remote/Local HITM, generic load a= nd + peer access =20 cpu cnt - number of cpus that participated on the access @@ -251,7 +262,8 @@ The 'Node' field displays nodes that accesses given cac= heline offset. Its output comes in 3 flavors: - node IDs separated by ',' - node IDs with stats for each ID, in following format: - Node{cpus %hitms %stores} + Node{cpus %hitms %stores} (For display with HITM types) + Node{cpus %peers %stores} (For display with "peer" type) - node IDs with list of affected CPUs in following format: Node{cpu list} =20 --=20 2.25.1 From nobody Fri May 8 07:37:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EC61C433EF for ; Sun, 8 May 2022 09:27:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244271AbiEHJae (ORCPT ); Sun, 8 May 2022 05:30:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbiEHJaG (ORCPT ); Sun, 8 May 2022 05:30:06 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C70B10FD2 for ; Sun, 8 May 2022 02:26:05 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id i1so11339972plg.7 for ; Sun, 08 May 2022 02:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sv1aE7FqnI8CKL/sxONnHhH4U4DVSrjLXubYrt9Z0fU=; b=PNObX5zzmqLePczW+hBwWlq1W7MvUHr0f52SYFReY+/Ki1myeXly338eeRZantdZr5 RQb9ALEOb9P3wyOUaltvW77ApV7chGgjxSjGheF9qb17aZ4OortrEWjtaYV+dF5RpuG/ s1dZ67CG45dMetd/1fYblcyEzV96vF0rJxR1MomaQDJB+HBydIpfb5IpgV8QCtqd1918 LDPy/hJUGMLY7PNjU8DGJLQ/na+V/WEkUBaHQYoiNzj+APLOJit/z3McF9A5MmWxZy38 4iyN4kDHz8AIh425Y7cdU8SHM0PMl+yLGjW+oFVL0PPT9yrJ5rKAtoir0tmQXb26seeR wglQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sv1aE7FqnI8CKL/sxONnHhH4U4DVSrjLXubYrt9Z0fU=; b=jnNiF8AdR6PfYQ6j8H3uiqrzjtToYzcmc8mG/hHZuHwpaEtAxyhKtBLaX/tMRdhgbd IccYexFcH68QyvRaEUqkc0mYKmyltL8qJUiYVzoM5ATKH9l2di46ai8eb2Shp/HNI5K/ Z4BnoPL4x2vR9e5wotBiMs77MmNVuT3H6/7+nSbytm+AXksFDfJEhtOpIpsV01ZWZ7Ng usc8W2hiWWvSPNeYoWrh1dxj9n0EsmJfxFc2ul1FLeQzDX3Dmx0RutfmDDhSU1RrefLk OJh9gY8bnbu9DQkj6yEJ7eBtc3TYLopcXdyE/s0kEreU3U3DVOThT09/3DlDNmcy4ZGY RsqQ== X-Gm-Message-State: AOAM532wKgVxyRsopG76BQ+FQwBEoayp3yIWeRMOP+BRSDrF78WJMDPb FDZYDjXDThr0h6bp2OkCU2xBAg== X-Google-Smtp-Source: ABdhPJyY4JJvoKWLet/PsVWyBKDJibBPszt7mSL4y2hyFxP/9UiEh7EcnVn8+VjkDGeDqa8ZDURHVA== X-Received: by 2002:a17:90b:3903:b0:1dc:8fe0:df4d with SMTP id ob3-20020a17090b390300b001dc8fe0df4dmr12804471pjb.191.1652001964510; Sun, 08 May 2022 02:26:04 -0700 (PDT) Received: from localhost.localdomain (104-237-153-19.ip.linodeusercontent.com. [104.237.153.19]) by smtp.gmail.com with ESMTPSA id t63-20020a638142000000b003c14af505f7sm6155088pgd.15.2022.05.08.02.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 02:26:04 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Like Xu , Ian Rogers , Alyssa Ross , Kajol Jain , Li Huafei , German Gomez , James Clark , Kan Liang , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 11/11] perf c2c: Use 'peer' as default display for Arm64 Date: Sun, 8 May 2022 17:23:46 +0800 Message-Id: <20220508092346.255826-12-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220508092346.255826-1-leo.yan@linaro.org> References: <20220508092346.255826-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since Arm64 arch doesn't support HITMs flags, so use 'peer' as default if user doesn't specify display type; for other arches, it still uses 'tot' as default display type if user doesn't specify it. Suggested-by: Ali Saidi Signed-off-by: Leo Yan --- tools/perf/builtin-c2c.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 9b6d2a9553e1..774da4a60c08 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -2787,7 +2787,7 @@ static int setup_callchain(struct evlist *evlist) =20 static int setup_display(const char *str) { - const char *display =3D str ?: "tot"; + const char *display =3D str; =20 if (!strcmp(display, "tot")) c2c.display =3D DISPLAY_TOT_HITM; @@ -2973,9 +2973,6 @@ static int perf_c2c__report(int argc, const char **ar= gv) data.path =3D input_name; data.force =3D symbol_conf.force; =20 - err =3D setup_display(display); - if (err) - goto out; =20 err =3D setup_coalesce(coalesce, no_source); if (err) { @@ -2996,6 +2993,22 @@ static int perf_c2c__report(int argc, const char **a= rgv) goto out; } =20 + /* + * Use the 'tot' as default display type if user doesn't specify it; + * since Arm64 platform doesn't support HITMs flag, use 'peer' as the + * default display type. + */ + if (!display) { + if (!strcmp(perf_env__arch(&session->header.env), "arm64")) + display =3D "peer"; + else + display =3D "tot"; + } + + err =3D setup_display(display); + if (err) + goto out_session; + session->itrace_synth_opts =3D &itrace_synth_opts; =20 err =3D setup_nodes(session); --=20 2.25.1