From patchwork Sat Sep 12 02:56:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 261007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70EF6C433E2 for ; Sat, 12 Sep 2020 02:57:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 335BC221EB for ; Sat, 12 Sep 2020 02:57:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="o8gd8L6c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725837AbgILC5F (ORCPT ); Fri, 11 Sep 2020 22:57:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbgILC47 (ORCPT ); Fri, 11 Sep 2020 22:56:59 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5D42C0613ED for ; Fri, 11 Sep 2020 19:56:58 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id r193so13238ybc.2 for ; Fri, 11 Sep 2020 19:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=m07aqYCBr3BugQcnNhbXBunb8rguqcPxK+1uBceisy4=; b=o8gd8L6cwO7USS+zSeJvNGNPvSjkj3df9QrcXoii7Dj+MjLEgMkReLgRPFgPNejXYo g8ctX6BQLS0y8MwnOS362iGE3i9SUp5J8rdAlKvTa185XVXDVpcz4oY0k1uzXGqfyOfW AZzBINXmWkoh1485ZYyiWuYBI/48wE9i3tZEzW0MhwhDv1rTj+qkIxDXS5A1WnKz+Dxt s6vvazXjmoUb+Usq+xx++LL4WgmbkH6qytSUPmIKE/nmRuLZE2CNbUMo10l/uQ+meKOD m6W770lNlKtciQ6ta5gSZnzO5pMnznEX2vzg5toDhjVhUdVaAUk5OAlmA7QJBwfs7B+z 4Esg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=m07aqYCBr3BugQcnNhbXBunb8rguqcPxK+1uBceisy4=; b=jTOaYx6n4pfHAThDmDdcSnXVCi3B8LvcIE5Nw1k3cjitLz+JwnNbu7O6VWnoUDpy+L xmFd5RPerphrgi6I0Iwmt7x35E5lLXPsXhyari1nAgZ9oXJt4310Z6EYmEFvilL8lIW1 gDDcuv4nJLhMiYM6DUuYf8d5bNSWMGmUe2pRBHoOfqCBzQRyQYHr4O3j/cdojBBYyYa1 XgiVWBrWXvORMuAROS3Pgc5LuKtKjhEu/FsXpzmLiEVAUCJI0BzVBkhZzaMvJxaf2nba tcrVHuFpD5AnO000yC5rzUx6MCJ2V1kb66GjvCLqvXW9LPrOZ+Wd4m55AkGH5ujggMx2 uP1Q== X-Gm-Message-State: AOAM531H3ANB8Joh2NNhDXgESCwsse1NF2GNLHwgDLjzxcA776bKUFjF ZYX2AWR7wsdqb2FyVlnQ6XP61Zl+6+Rw X-Google-Smtp-Source: ABdhPJykicvlDlpk6vddU+n3i8ZICnShO591arsdtiL3sRk9G5NjJiJWw/dwGWCtCVTJAvwbSYst8tq9iAnr X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:2:f693:9fff:fef4:4583]) (user=irogers job=sendgmr) by 2002:a25:d010:: with SMTP id h16mr6745698ybg.439.1599879416979; Fri, 11 Sep 2020 19:56:56 -0700 (PDT) Date: Fri, 11 Sep 2020 19:56:51 -0700 Message-Id: <20200912025655.1337192-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.28.0.618.gf4bc123cb7-goog Subject: [PATCH v3 0/4] Fixes for setting event freq/periods From: Ian Rogers To: 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 , Adrian Hunter , Andi Kleen , Athira Rajeev , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Cc: Stephane Eranian , Ian Rogers Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Some fixes that address issues for regular and pfm4 events with 2 additional perf_event_attr tests. Various authors, David Sharp isn't currently at Google. v3. moved a loop into a helper following Adrian Hunter's suggestion. v2. corrects the commit message following Athira Rajeev's suggestion. David Sharp (1): perf record: Set PERF_RECORD_PERIOD if attr->freq is set. Ian Rogers (2): perf record: Don't clear event's period if set by a term perf test: Leader sampling shouldn't clear sample period Stephane Eranian (1): perf record: Prevent override of attr->sample_period for libpfm4 events tools/perf/tests/attr/README | 1 + tools/perf/tests/attr/test-record-group2 | 29 ++++++++++++++++++++ tools/perf/util/evsel.c | 10 ++++--- tools/perf/util/record.c | 34 ++++++++++++++++++------ 4 files changed, 63 insertions(+), 11 deletions(-) create mode 100644 tools/perf/tests/attr/test-record-group2 Acked-by: Jiri Olsa