Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp944414pxb; Fri, 22 Apr 2022 15:01:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1eIsIwn0sC7He6stG5tK9eMj/YUlkqyuM+8rh40InjcSTjEQQ3yir6SjrC9mvlEhP1Q3l X-Received: by 2002:a17:90b:388f:b0:1d2:7381:3b41 with SMTP id mu15-20020a17090b388f00b001d273813b41mr18632898pjb.72.1650664891769; Fri, 22 Apr 2022 15:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650664891; cv=none; d=google.com; s=arc-20160816; b=UQpL/EJzUIniaBjGfO4y/BBOZNVsYgqpUA7VwbvIrELqXh0gjViCMOX+bxZduCmily irLdorFbdb/7s/Ko3mE3n6jeCi1/mFOY9MJ70Y9mMJESFJDxPGjBKTk8LxlwaSJbf27K VZhRmxsNF6TeVFbMVHfqVlDXD5qsWa9VGMBCFapRP1lBy2m+J9EiElxf53gv5o7hDJDF G8xZLtwqmcKJ4SR2Kyn/Tv18QGCj8IAobsXFi0LV7enh/EXAxNjzYTnmz3OTi5cVrmvL SJGHrVzXbiJ1DVk79elKWs74batXUALeLvmTOqsQHIhFAEyFrYhqsv5T5yAy6QEdz4Ld bSIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/5jFIllHJ5gNhVb9UGODyKx/Qa32vuqS5VMBQo+3n8s=; b=ThvfHG6gDR/ZdWxFBxiXuzagMl5yvfXfo8h+cove/mq3K8lhPyivvKLIshQZXsHuii +ZB4VhhCgWZO4UzKoiukhWywwCd4UEP/Jak+aD6SJ2I5NlehkbNC20sb6auQsSKvkGGy JGNOllzfYLP0Mfaq8sYWMdCGxXSkCHni+sPYCkgnTRo0TMOHEt2PRJrQiHpLnhRCJQmi So82TXhx9nHXcJtlIH8nrhlqmtX2gTb6TXUiHDzWBrYQ454vktO3/MJwTLb3WVCE8WTb ebBRq6wHKldOCptkDu4UMZKxnOseuDBqdjYfwYeGaHz8sxA0DGZ4fIFJfjGS0Wv7FMaG Miiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cU5sTb2I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p7-20020a056a000b4700b0050a94b26ec7si10447430pfo.7.2022.04.22.15.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:01:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cU5sTb2I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C52118E185; Fri, 22 Apr 2022 13:09:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1446428AbiDVKOb (ORCPT + 99 others); Fri, 22 Apr 2022 06:14:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377723AbiDVKOa (ORCPT ); Fri, 22 Apr 2022 06:14:30 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A7D5506E7; Fri, 22 Apr 2022 03:11:37 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id r13so15429152ejd.5; Fri, 22 Apr 2022 03:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/5jFIllHJ5gNhVb9UGODyKx/Qa32vuqS5VMBQo+3n8s=; b=cU5sTb2IGwQuvzP/JShkIB3U7TZ3eteKDNGGlPUluCEbu5FoP95ibrNSC4SNWpKvHv onI6hGSIyTdveM/RFpT0xSVMIAbUOfBvgIWLPoyyfmo8v1jnb3vk1X4USaDRRAsN0/1N A1R4VBo3T6kcXEYu5XHyTLnM9Bsu7n7eva/+8Lhmfeqh0tpvQzGrBVR6LZp7GUvYk55x 1lX0qvSoh4yX5aJa7Ktk4VVubRFVUs51gdzzy9Txr3E+lZvHP2dG3ylK9sUvxok679I5 LHMXpqqwJFjT+6XSINmkRDR3OQjrI5XbWuIVlIyQxhtUiSRFxySjHldkbmeoy4JDKxJ9 JY7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/5jFIllHJ5gNhVb9UGODyKx/Qa32vuqS5VMBQo+3n8s=; b=UuZ+90tqO6qvHr1vJKD6XurhAFLQgcOCIUyhzU2HFEX4s8J1X2k/Afs30cqXIoMwkL re+0wZBkmSnXHKFrwq98xfMbRyadKZYDDlZp0EE/ANBcHJzVOIGqoxyjzPDUBtrLI2Sf 7nD3BneKQZ2dhVYd8O5kEKqVtnNfzx/ljG/DVoGaC6o89TblfGVDHRp1GeHXLk/g4FPP //Zt2EEuI18KnMeWkf+S+Sg812KOGuG5uHA515Ml1hjHpDerKgZWwBs395Z80zidAb0p 0y8TjjAHvd9fzMaAeAj8Ctt0sy/PumDrOxZjxmFwHxQ4VKh2XwjGTu1EVffBIWKpGuQz Ak9A== X-Gm-Message-State: AOAM533prTGt5/HkWogc1ZpD3l7m5M+KBz0hDYJn3WlNZV2wi3XpKAjt jTKTMJbZ98QYFlZQGjifCg0= X-Received: by 2002:a17:906:7304:b0:6da:9243:865 with SMTP id di4-20020a170906730400b006da92430865mr3317761ejc.665.1650622295880; Fri, 22 Apr 2022 03:11:35 -0700 (PDT) Received: from krava ([193.85.244.190]) by smtp.gmail.com with ESMTPSA id y19-20020a056402359300b00423e51be1cesm707069edc.64.2022.04.22.03.11.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 03:11:35 -0700 (PDT) Date: Fri, 22 Apr 2022 12:11:32 +0200 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Andi Kleen , Ian Rogers , Song Liu , Hao Luo , bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, Blake Jones Subject: Re: [RFC 0/4] perf record: Implement off-cpu profiling with BPF (v1) Message-ID: References: <20220422053401.208207-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220422053401.208207-1-namhyung@kernel.org> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE 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 On Thu, Apr 21, 2022 at 10:33:57PM -0700, Namhyung Kim wrote: SNIP > The perf bench sched messaging created 400 processes to send/receive > messages through unix sockets. It spent a large portion of cpu cycles > for audit filter and read/copy the messages while most of the > offcpu-time was in read and write calls. > > You can get the code from 'perf/offcpu-v1' branch in my tree at > > git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > Enjoy! :) CC builtin-record.o builtin-record.c:52:10: fatal error: util/off_cpu.h: No such file or directory 52 | #include "util/off_cpu.h" forgot to add util/off_cpu.h ? jirka > > Thanks, > Namhyung > > > Namhyung Kim (4): > perf report: Do not extend sample type of bpf-output event > perf record: Enable off-cpu analysis with BPF > perf record: Implement basic filtering for off-cpu > perf record: Handle argument change in sched_switch > > tools/perf/Makefile.perf | 1 + > tools/perf/builtin-record.c | 21 ++ > tools/perf/util/Build | 1 + > tools/perf/util/bpf_off_cpu.c | 301 +++++++++++++++++++++++++ > tools/perf/util/bpf_skel/off_cpu.bpf.c | 214 ++++++++++++++++++ > tools/perf/util/evsel.c | 4 +- > 6 files changed, 540 insertions(+), 2 deletions(-) > create mode 100644 tools/perf/util/bpf_off_cpu.c > create mode 100644 tools/perf/util/bpf_skel/off_cpu.bpf.c > > > base-commit: 41204da4c16071be9090940b18f566832d46becc > -- > 2.36.0.rc2.479.g8af0fa9b8e-goog >