From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 5DC8DC2D0A3 for ; Mon, 26 Oct 2020 15:49:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1EEDB22400 for ; Mon, 26 Oct 2020 15:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1784405AbgJZPtQ (ORCPT ); Mon, 26 Oct 2020 11:49:16 -0400 Received: from mga03.intel.com ([134.134.136.65]:34210 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1773092AbgJZPtP (ORCPT ); Mon, 26 Oct 2020 11:49:15 -0400 IronPort-SDR: Qx6XNKoNK4y9Gcprj6v/AEH2VaFZQGBRZoOkOnWz4m9cgfjyM7imqfK6+s82wqXytg64kPpfKz pYmbuy9KjyLw== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="168041448" X-IronPort-AV: E=Sophos;i="5.77,420,1596524400"; d="scan'208";a="168041448" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 08:49:11 -0700 IronPort-SDR: L8CHJOf2wvavRphnAa7lRq33t4OuN8POPsrsN04+1wsbgVoo/uMvtCu3d61iojK6cLpyXh36vx 28L2YFSY/uRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,420,1596524400"; d="scan'208";a="467967505" Received: from um.fi.intel.com (HELO um) ([10.237.72.57]) by orsmga004.jf.intel.com with ESMTP; 26 Oct 2020 08:49:08 -0700 From: Alexander Shishkin To: Andi Kleen , Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Mark Rutland , LKML , Stephane Eranian , Ian Rogers , alexander.shishkin@linux.intel.com Subject: Re: [RFC] perf evlist: Warn if event group has mixed sw/hw events In-Reply-To: <20201026152108.GW466880@tassilo.jf.intel.com> References: <20201026141937.582087-1-namhyung@kernel.org> <20201026152108.GW466880@tassilo.jf.intel.com> Date: Mon, 26 Oct 2020 17:49:07 +0200 Message-ID: <87y2jtq970.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andi Kleen writes: > On Mon, Oct 26, 2020 at 11:19:37PM +0900, Namhyung Kim wrote: >> This patch just added a warning before running it. I'd really want to >> fix the kernel if possible but don't have a good idea. Thoughts? > > The easiest fix would be some multi threading in perf stat opening, then then > extra latencies could be mostly hidden. One thread per group would probably > be overkill, but just a few threads would lower the penalty significantly. > > I think that would be better than this patch and it's likely not that much > more complicated, as this is already a lot of code. > >> +{ >> + const char *known_sw_pmu[] = { >> + "software", "tracepoint", "breakpoint", "kprobe", "uprobe", "msr" > > That's a non scalable approach. New pmus get added regularly. It would be better to > indicate this in a generic way from the kernel. That, and also, intel_pt is a software PMU and a few of its features depend on intel_pt/.../ being a group leader. Regards, -- Alex