From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752943AbcFOBub (ORCPT ); Tue, 14 Jun 2016 21:50:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41472 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752314AbcFOBua (ORCPT ); Tue, 14 Jun 2016 21:50:30 -0400 To: Brendan Gregg Cc: Richard Henderson , systemtap@sourceware.org, iovisor-dev@lists.iovisor.org, Linux Kernel Mailing List Subject: Re: BPF runtime for systemtap References: <72b69807-4cd7-afab-0acd-51af8c76469e@redhat.com> From: fche@redhat.com (Frank Ch. Eigler) Date: Tue, 14 Jun 2016 21:50:31 -0400 In-Reply-To: (Brendan Gregg's message of "Tue, 14 Jun 2016 16:53:58 -0700") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 15 Jun 2016 01:50:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org brendan.d.gregg wrote: > [...] > Great! Is there a hello world example in there somewhere? I found this: > [...] Yup. Here is a smoke test. (A great many other things are not yet working.) % sudo ./stap -v --runtime=bpf -e 'global foo probe kprobe.function("vfs_read"), kprobe.function("do_select") { foo++ } probe begin { printf("systemtap starting probe\n") } probe end { printf("systemtap ending probe\n"); printf("foo = %d\n", foo) }' Pass 1: parsed user script and 35 library scripts using 198460virt/15804res/6416shr/9208data kb, in 0usr/0sys/71real ms. Pass 2: analyzed script: 4 probes, 0 functions, 0 embeds, 1 global using 198460virt/15804res/6416shr/9208data kb, in 0usr/0sys/0real ms. Pass 4: compiled BPF into "stap_32349.bo" in 0usr/0sys/0real ms. Pass 5: starting run. systemtap starting probe ^Csystemtap ending probe foo = 108812 Pass 5: run completed in 0usr/10sys/2525real ms.