Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp90943rwb; Mon, 26 Sep 2022 15:16:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM40b6BFLCyaZxUQBizfrIeD8MU0yh3WE0z/h9ht3t2cTiPxV4bLgj5G54ddDHfjrvAIL2SG X-Received: by 2002:a05:6402:518d:b0:451:6655:5fb4 with SMTP id q13-20020a056402518d00b0045166555fb4mr24770313edd.150.1664230592952; Mon, 26 Sep 2022 15:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664230592; cv=none; d=google.com; s=arc-20160816; b=wb5dDEjmTf5r0KQm3uhUS3bllxqYvburH50YHUOjmeYRYuMSogUgR95oGM2CgK0a/s fFBIruKIAbTvMFYHUzGQk/lAnHurlVpJBeQ9B3yvfr9A/pztv+X6Fs/Xu41kqB28l/d2 6pkSPmu5JzsTgBeGCOGKGzEHVHkOe40XfeCHSN8y57i1vPo+3WnJnZB5lwSIHTsjEAut hZzBY8MSL9PD2Y4CECnVQqdzmIw4JCsluwQ5rt96hXV3DmOICbMXQQRSbrrdeEfhOYvr /jPbO8dYXG/oIzMgoT4jxdpzoPgLo8ijjCaFXVTx8VdX7o02HXaQKDNA8+jb5fd8/GAg MbxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=+KcZVOe6xtv1ry2Jgrm4LTKRDPbLt0jHuqQFNWmEBt0=; b=q5XKeOavGIcWMuEhElBUeeYIViybcCIU7ppEd60Da+uNL3KPJOzCKt6BSbkVjE9lOc JxzFS8PJ2/I0ymzypHnzhY9I2hmjOxL4wAk0BgJHzcDrpqpDyjCRvQWAy3r0YQ7BVRV6 qNFFUophOCK1SMmap5r01A5+tDt64H9wiOD1mqF7ksdr5qU5xmwfTPn6c6PmrfaCm5a0 u6MH+rxeVupt0D4+VqL0z2K2M2skwpJ/tp/8hDw+smIOv0qJnoMAuxefz0Mb9UixDD2F YR8Ld5NlNzukjsxdUJCF1yvIfhlGyOV6LpuFX3usxtjZV/DkqYCVMJ0snyj27LIEbIcR gltg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r1-20020a1709060d4100b007803ea2d040si1090414ejh.478.2022.09.26.15.16.06; Mon, 26 Sep 2022 15:16:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230061AbiIZVmk (ORCPT + 99 others); Mon, 26 Sep 2022 17:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbiIZVmh (ORCPT ); Mon, 26 Sep 2022 17:42:37 -0400 Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 937B9A50EA; Mon, 26 Sep 2022 14:42:33 -0700 (PDT) Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-127ba06d03fso11022765fac.3; Mon, 26 Sep 2022 14:42:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=+KcZVOe6xtv1ry2Jgrm4LTKRDPbLt0jHuqQFNWmEBt0=; b=iPST+DeNKA+biF0faph2OUmSCQhOTkqZrj+J/ezhHPq3T2DvNRncPkNfqsyUYQmVnN BAm//KcmS45hTnORdgrji5ww24H3PNXkUziC636Axjy/Txb6igSP2MM58ymculMOgO/D J2lhpZtSbIKRvTePdf0HkvA5aUfxLf5+Uju1Bgdr7f0qMCLZuZ2F+v9WdG1LwKJy+1yL yrXA0noqUeLVKaaVoisMTdo8AfikPtidwC7idoyCjnraPvhrWrSsI5CwNGmRQJYNv0I1 UP0Psz/sI1bi9sQtuwQf1u6Y9SqBTSUHMOn6f498T0EAN/xos9vvlx/yHGuRUjHxAHfw AeKw== X-Gm-Message-State: ACrzQf0LiUzRqgiQBb4ppA6V+/eUD4W3/NZpoRRry20e6TAPMPQadCNn pHzpO0cxwOcRwFjLmBPBK6nIVxVVp3o4r1Dta6g= X-Received: by 2002:a05:6870:a70f:b0:127:666a:658 with SMTP id g15-20020a056870a70f00b00127666a0658mr433946oam.218.1664228552381; Mon, 26 Sep 2022 14:42:32 -0700 (PDT) MIME-Version: 1.0 References: <20220802191004.347740-1-namhyung@kernel.org> <20220802191004.347740-3-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Mon, 26 Sep 2022 14:42:21 -0700 Message-ID: Subject: Re: [PATCH v2 3/3] perf lock: Print the number of lost entries for BPF To: Jiri Slaby Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , linux-perf-users , Will Deacon , Waiman Long , Boqun Feng , Davidlohr Bueso , Song Liu , Blake Jones Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Mon, Sep 26, 2022 at 1:05 AM Jiri Slaby wrote: > > Hi, > > On 02. 08. 22, 21:10, Namhyung Kim wrote: > > Like the normal perf lock contention output, it'd print the number of > > lost entries for BPF if exists or -v option is passed. Currently it > > uses BROKEN_CONTENDED stat for the lost count (due to full stack maps). > ... > > --- a/tools/perf/util/bpf_skel/lock_contention.bpf.c > > +++ b/tools/perf/util/bpf_skel/lock_contention.bpf.c > ... > > @@ -73,6 +73,9 @@ int enabled; > > int has_cpu; > > int has_task; > > > > +/* error stat */ > > +unsigned long lost; > > I don't know how all this is generated into lock_contention.skel.h. But > I believe this patch breaks perf build on 32bit: > > [ 375s] In file included from util/bpf_lock_contention.c:13: > > [ 375s] util/bpf_skel/lock_contention.skel.h: In function 'lock_contention_bpf__assert': > > [ 375s] util/bpf_skel/lock_contention.skel.h:537:9: error: static assertion failed: "unexpected size of \'lost\'" > > [ 375s] 537 | _Static_assert(sizeof(s->bss->lost) == 8, "unexpected size of 'lost'"); > > [ 375s] | ^~~~~~~~~~~~~~ > > Should the above (and below too) be __u64? Oops, it seems BPF ABI uses 8-byte long even on 32-bit systems. Sorry for the inconvenience. Will change. Thanks, Namhyung > > > --- a/tools/perf/util/lock-contention.h > > +++ b/tools/perf/util/lock-contention.h > > @@ -113,6 +113,7 @@ struct lock_contention { > > struct machine *machine; > > struct hlist_head *result; > > unsigned long map_nr_entries; > > + unsigned long lost; > > thanks, > -- > js > suse labs >