Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1429498pxb; Wed, 30 Mar 2022 03:24:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzOvVe4ARSnAM+xvlbnejk9bYhuQNf1JA9a48u37s8/m28Nvw2zi7zY0yJelZQjHmThPzU X-Received: by 2002:a17:907:7daa:b0:6e0:c04f:be44 with SMTP id oz42-20020a1709077daa00b006e0c04fbe44mr27889786ejc.375.1648635870259; Wed, 30 Mar 2022 03:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648635870; cv=none; d=google.com; s=arc-20160816; b=XpXi7oC2QMGdhfdjb+mKKc2xJQREMEp8nEL0oNXCgBpOaAxBnaI2Y8i1SiVuhitXv1 ZCES0lw+1TpDT1K39JX4/D/1iTp5jk0hP5J5HVNDsIeU3rfzMs3/bWqVfw238EREyOLd yZJmcV34Jp0zIwuUQs7lqI3YY8OVt3cD2OIYNT8ONR9aXIX7eHXqM/n13liwGCfFABdW aMrLe5YHH3/nv6yiyuS6brVKVHO8bBzKWMJGsWdIyMRBNYpLqznUE5nYksdbYCv/7eQM wvBm00OAS/I9QsbX3K1CgC7R3DPsusvFM4MKdLgkIT5ivkXPzO6oiyU+XIFODx1DjElU iWJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QyDFxy0YW7xWZDfpc1FK0Ed2nDEvjN/mE8B1+6pJVAM=; b=MsNWZkig99j20D0UII1R5TCDfo7XexdFCFtZKPM2H/grp5qMqZ+1dFkxwWMQ62Mqr8 LQBk5WAS6IT97zebh/DvFGyNhMWZAGNnxmjvaYusUBAkzHR//2FepOsv20QGRFnVkBWx z6j9/87DEg/78lv2lehf+4TuOWu2zhS9FMzGzJSWX/HpYsq5bRyF8Qc361VlqB1e1RqS w6VY6B10hF/cH0aVS1MhCXVC1L6V0dB/TmDOeNOdNqFqviPjwT+Q4UID9lLfmsrlHqyM rbZuCK2WXhMfNnmEaNrVYDaATjXuU0PUlJyEgi3aP700AFIjTN3q7OdjBc9EEB+O9Zvr ZVXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=n2XunwIM; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a50d092000000b00418c2b5bf7csi20622667edd.606.2022.03.30.03.24.04; Wed, 30 Mar 2022 03:24:30 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=n2XunwIM; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239603AbiC2Q1X (ORCPT + 99 others); Tue, 29 Mar 2022 12:27:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238850AbiC2Q1V (ORCPT ); Tue, 29 Mar 2022 12:27:21 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C38822296C2 for ; Tue, 29 Mar 2022 09:25:38 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id b9so12723534ila.8 for ; Tue, 29 Mar 2022 09:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=QyDFxy0YW7xWZDfpc1FK0Ed2nDEvjN/mE8B1+6pJVAM=; b=n2XunwIM1rA43NFhSIbUPVLssT+4UHVAXlm3bJ+lXbjS6yoYiWHsPIbBBuSAjHDuU+ rd7Yfcl2ZTSAoQRU0kCOKeq92TZ3F8E+gh3lnK4RnkMmOKJtDBqoARWDdtSaqwmQhK0F +6ccwF7KYXrSuI7PJS7aXjbFuly3vU1318Jj+WC/bVmB2RbTfQHQGTbWPmbB51WpXmbv qFSvgmyEaLcBcfu04KoqwKDb0UtBCN40pywq9gZpWPRZGyZV8EsMHWX5AWzaxvZ6zT8Q cNZAMRo+6VBA+SlsXfZ4zRmX7LG4lw1zkRpcaogldg3yjEWHuJL6T5ef/HYHXF7u5lIS +U2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=QyDFxy0YW7xWZDfpc1FK0Ed2nDEvjN/mE8B1+6pJVAM=; b=YMf3MySN1ROh4myI1yt0KNkRnO8UlOtSrP9YzcZZv2GfLvhlGc/8YVDKycFExK5Gun MtIGBN+RcUUWzqIEnm5b47Y7H17R1zMA+NdVuGAQ8Od+QSCRdx9zgKdAAnWz6ZcHTQOU 7tCoh3Tp1sJicADl8ZiCu5oy2ibKvPbb+/khCMj5PAUaOH0Yvu8292MTR6Ypons1fhEk G/um0i/Jsc49/45PjyIW5yGUhwBTX6oSzXf6Lm3TbDHkJBGnfr4QP4mxoI87tFCBZc8+ Kec/dvwWasqqtHdPCz8zjTZp0ny5LV888iHLmR2fpZ9OCe8Bf3wtIj/YzMqcJM5nRFfw r0nQ== X-Gm-Message-State: AOAM5322Ym2A3VlA9EhiOdjRJjC+Nj5Id5jK7zlu5S3Q/zsBcSWW/VoO CgVu4qh0oJ0BLzpWGTMwBkxHlKM0yWZ5mv5ca8YwnsJR X-Received: by 2002:a05:6e02:1a23:b0:2c9:c008:8ad6 with SMTP id g3-20020a056e021a2300b002c9c0088ad6mr4477604ile.98.1648571138158; Tue, 29 Mar 2022 09:25:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrii Nakryiko Date: Tue, 29 Mar 2022 09:25:27 -0700 Message-ID: Subject: Re: [FYI PATCH 1/1] perf tools: Update copy of libbpf's hashmap.c To: Arnaldo Carvalho de Melo Cc: =?UTF-8?Q?Mauricio_V=C3=A1squez?= , Andrii Nakryiko , Ian Rogers , Jiri Olsa , Namhyung Kim , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Mar 29, 2022 at 7:46 AM Arnaldo Carvalho de Melo wrote: > > Just FYI, I'm carrying this patch in the perf tools tree. > Cool. I have some tentative plans to do some more changes to hashmap for improved API usability and performance, so you might need to pull a few more patches in the near future. > - Arnaldo > > --- > > To pick the changes in: > > fba60b171a032283 ("libbpf: Use IS_ERR_OR_NULL() in hashmap__free()") > > That don't entail any changes in tools/perf. > > This addresses this perf build warning: > > Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from = latest version at 'tools/lib/bpf/hashmap.h' > diff -u tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h > > Not a kernel ABI, its just that this uses the mechanism in place for > checking kernel ABI files drift. > > Cc: Andrii Nakryiko > Cc: Ian Rogers > Cc: Jiri Olsa > Cc: Mauricio V=C3=A1squez > Cc: Namhyung Kim > Signed-off-by: Arnaldo Carvalho de Melo > --- > tools/perf/util/hashmap.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tools/perf/util/hashmap.c b/tools/perf/util/hashmap.c > index 3c20b126d60d869a..aeb09c2887162d16 100644 > --- a/tools/perf/util/hashmap.c > +++ b/tools/perf/util/hashmap.c > @@ -75,7 +75,7 @@ void hashmap__clear(struct hashmap *map) > > void hashmap__free(struct hashmap *map) > { > - if (!map) > + if (IS_ERR_OR_NULL(map)) > return; > > hashmap__clear(map); > @@ -238,4 +238,3 @@ bool hashmap__delete(struct hashmap *map, const void = *key, > > return true; > } > - > -- > 2.35.1 >