Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp758399ybk; Fri, 15 May 2020 12:44:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlrCb4J+Grj1InIaX+SGH9dFn6oxooOd1TzGCQkAgoj9t0fk8x7z3JpoQ5bxl9/jKi3sKh X-Received: by 2002:a17:906:3517:: with SMTP id r23mr4544167eja.304.1589571871286; Fri, 15 May 2020 12:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589571871; cv=none; d=google.com; s=arc-20160816; b=jX2DpWBeyL8RoqtUFjEffKbZ3/ACo/sVQVOniH5VkvkMcKOfdBik18u5kPwxdtJBfG +Q1TX8TzJk4KGs6zNzAL6JraaK/k2xnVnoGCsPPZ5kxpcySq3lL/CPVIDfp8INJP8i+3 0vabplyITZ1Ga5phhrPhAMhmyOWbMakJwR+l0VGLWKHlN6l7Vy3UiEHy6lXe/QVnBXSM oMTcQ4XfGRQkPKqzpkuSpky2QXeidKH9wa9EA74Gc5/L3Uplw3oMPooYLfGT2t6WpZC7 fSjLTzip6LdXQmMeuy8ga4XdEI3SdMuB/Bzi+C5mkurvUX/hc3H7tlxCXeCxxLPyHTmU ++1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=O4VLOaxbVjaBb7rcCBZ6LrCtmkCPRdVq27mw9nxBaj4=; b=qQ61JIFuZuLXuY6zVPIq6qAm7C5qTeL3D52jnSMkH5J1Hrlg44jCTW7JpreoGLC0q/ U71e71VJhaIXs4QFxLqmRgNT01arze5OVD01Y7ZTTBOaU+PQ4yp1oiI58ctErTCSfb9+ +ASNovGoUTCGXXAk3XH+SXm7jW1syXFwNURVr8PseD1vrJ4ORgBK8XLzXh8QRyUSHBdg 93PmMV7KWhlYYFRD2deDan/+LJ+ir+jq2F+4JRx3GZJRhWV9NjzWq256DfgUYG7aUYQV 9SPDAYHhfAkNlBEwKfpEOTC5ORzp5kz7BHeM8BeIff4749ylPKt7Tf76UTsu2K4VvEqi eniQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X1D0v8CH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si1726572ejo.296.2020.05.15.12.44.08; Fri, 15 May 2020 12:44:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X1D0v8CH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727012AbgEOTmC (ORCPT + 99 others); Fri, 15 May 2020 15:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726188AbgEOTmB (ORCPT ); Fri, 15 May 2020 15:42:01 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34AB8C061A0C; Fri, 15 May 2020 12:42:01 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id f83so3803811qke.13; Fri, 15 May 2020 12:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O4VLOaxbVjaBb7rcCBZ6LrCtmkCPRdVq27mw9nxBaj4=; b=X1D0v8CHkxZGBLI08rsxQ5szdvBF1c7L0WvMpT+c8aV+etCL4JfGVda3XuY4vfqAFb tkuob9MO7KJK7tksUHzE8eV6BDbjUxc4GE6s1RmQj5/fD1VVQt0aphJLesWrdegQ9Hqg JVdM3aafixEsmfEoo4YzxtcvLwSboqmLEGK2GJBBw6Q9nHUu/MYd2r+6rtdjmhpT0hRg hTU8eiQGAv44YITo8dK4F0P8mJBsNFp/c4JOtEXHaN1p0yLJ0zLZsxNiRmUElZIDaoza +EL6cPi5ogGF028e9vXfLDAHxK6UwwLXEkzaUJZZILy1WR/ggeJp0peRgxzioGaRCiRh 0RoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O4VLOaxbVjaBb7rcCBZ6LrCtmkCPRdVq27mw9nxBaj4=; b=QnVGkQWhmLCEmixhRR7LkUnw2ApIMRPxXXeeLfZzvT/3tebYhZeQdbRJbFCHv3CKwY hBhXR+VjAbMMzIH0zqH7+Q9v8JSWlB5UkQsZQ0e8IWmlkn1E4HFPV9fVtwbzGqD4jWW0 PiVfHgDjSWSP3Wk62pu+BZBP/lYh5VgvoagbhOaTrD9+IzyZhf+VkDjaHrtH+ubNo3jN je0P7CBeMarF3EMQ1sRE0FOduOj9y0KQW8A6jReha+UXdyU0HAYdPxaj8tU1zHpI44Sb SguZWsu+4PomHkn/NsBUCq5C2d1uEX3cTyqBjeehKnJxjTkN0Hd0HKADvPqUP5yWzBZ1 bOCg== X-Gm-Message-State: AOAM531d8AhkoVcZm3EhwE+aZELg5uESKAR0qxvMo3ubVl7AbGpo3pp1 iwkRQSMTlBPwuwdAx9Qkb7iii3sB87nA2H/LBNY= X-Received: by 2002:ae9:e713:: with SMTP id m19mr5166675qka.39.1589571720452; Fri, 15 May 2020 12:42:00 -0700 (PDT) MIME-Version: 1.0 References: <20200515165007.217120-1-irogers@google.com> <20200515165007.217120-5-irogers@google.com> In-Reply-To: <20200515165007.217120-5-irogers@google.com> From: Andrii Nakryiko Date: Fri, 15 May 2020 12:41:49 -0700 Message-ID: Subject: Re: [PATCH v2 4/7] tools lib/api: Copy libbpf hashmap to tools/perf/util To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Kajol Jain , Andi Kleen , John Garry , Jin Yao , Kan Liang , Cong Wang , Kim Phillips , Adrian Hunter , Leo Yan , open list , Networking , bpf , Stephane Eranian Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 9:50 AM Ian Rogers wrote: > > Allow use of hashmap in perf. Modify perf's check-headers.sh script to > check that the files are kept in sync, in the same way kernel headers are > checked. This will warn if they are out of sync at the start of a perf > build. > > Signed-off-by: Ian Rogers > --- Given you want to make sure they stay 1 to 1, would just creating a symlink work instead of copying the code? Either way, I think hashmap is stable and not going to change frequently, so whichever way is fine with me. Acked-by: Andrii Nakryiko > tools/perf/check-headers.sh | 4 + > tools/perf/util/Build | 4 + > tools/perf/util/hashmap.c | 238 ++++++++++++++++++++++++++++++++++++ > tools/perf/util/hashmap.h | 177 +++++++++++++++++++++++++++ > 4 files changed, 423 insertions(+) > create mode 100644 tools/perf/util/hashmap.c > create mode 100644 tools/perf/util/hashmap.h > [...]