Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754862AbcDANuq (ORCPT ); Fri, 1 Apr 2016 09:50:46 -0400 Received: from mail.kernel.org ([198.145.29.136]:56855 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbcDANup (ORCPT ); Fri, 1 Apr 2016 09:50:45 -0400 Date: Fri, 1 Apr 2016 10:50:40 -0300 From: Arnaldo Carvalho de Melo To: "Wangnan (F)" Cc: David Ahern , Jiri Olsa , Namhyung Kim , Linux Kernel Mailing List Subject: Re: perf trace + BPF Message-ID: <20160401135040.GD7115@kernel.org> References: <20160331180803.GB10112@kernel.org> <56FE77D0.50900@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56FE77D0.50900@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1858 Lines: 55 Em Fri, Apr 01, 2016 at 09:29:52PM +0800, Wangnan (F) escreveu: > > > On 2016/4/1 2:08, Arnaldo Carvalho de Melo wrote: > >Hi Wang, > > > > Trying to get back at working with 'perf trace' + BPF and I'm > >noticing that the perf_event_attr->sample_type for the BPF events are > >different than the ones for the raw_syscalls:sys_{enter,exit} or to > >other tracepoint events we may ask 'perf trace' to set up, for instance, > >for: > > > >perf trace -vv -T --ev sched:sched_switch --ev bpf-output/no-inherit,name=evt/ --ev /home/acme/bpf/test_bpf_trace.c/map:channel.event=evt/ usleep 10 > > > >We get these sample types (full perf_event_attr dump at the end of this > >message): > > > >sched:sched_switch: > >sample_type IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER > > > >[root@jouet ~]# perf probe -l > > perf_bpf_probe:func_begin (on SyS_nanosleep@linux/kernel/time/hrtimer.c) > > perf_bpf_probe:func_end (on SyS_nanosleep%return@linux/kernel/time/hrtimer.c) > > > > sample_type IP|TID|RAW|IDENTIFIER > > > >raw_syscalls:sys_{enter,exit}: > > > > sample_type IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER > > > >I guess this is an interaction with that "no-inherit" part, probably we need to > >set PERF_SAMPLE_TIME by some other means... > > Please see [1]. Not related to no-inherit, just because the bpf-output event > is not a tracepoint. Right, that was a dead end of mine when investigating this, thanks for fixing this up! > And glad to see you restart working on my patches again! Yeah, hopefully this time we'll get most of what is outstanding merged. I want to at some time experiment with doing things 'perf trace' needs with BPF, behind the scenes :-) > Thank you. > > [1] http://lkml.kernel.org/g/1459517202-42320-1-git-send-email-wangnan0@huawei.com > > > > >- Arnaldo > > >