From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by sourceware.org (Postfix) with ESMTPS id A70FD3857020 for ; Sun, 12 Jul 2020 19:38:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A70FD3857020 Received: by mail-il1-x144.google.com with SMTP id o3so9386257ilo.12 for ; Sun, 12 Jul 2020 12:38:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ICV5sNdqA8488u3PRXZxdWDfJeiCWlmwjB1lolWOQU8=; b=BYC61SukYPUP6TPN7qgO+H95JFkiAS8Wxjze3nfQmWBhSbHFx9EXBrX6zsYcLiDwYD /QjspjqMRkGGMSQrKWjLFsVLWKpJLTH4Y4ezuYXQWvLzsmjkc+xjh+mJLUZFj6bbCuo9 IkCAHMtgha7BJYJ9TYSB8/eOtht7lPGiISC6WibfflCImQ8U50uNYMIKjsMHcFhFHxER qF0Lk+It7qdoRqYQQerFwib6pekjFgKv3dkEXXEVPwgRkJ4cmYl2De4wB7CrXIsSbYze Cd03NGxQ9ENETC4YOQG3rYPyfcDtpgpj2nqKiKpv4ntu/fYFYJfZ+dDXr4rGc3hb7yhW Alig== X-Gm-Message-State: AOAM533XB0SvNwQycNVxI25YFb7XuYVwoQbopMHQW6FMbwaWwbnAc77f SgljXIxRYelvSBJcmt5q9pfOTs/rIqjYUqUuHRBmFd+tOyQ= X-Google-Smtp-Source: ABdhPJycs4qgi/J/G1Rsyzh+oFVZBUrKyudRDhoZSwL9AelLzWYU3oAzphrvQjNp/tr9s2z3/IWGyP429tDwKN9VGpA= X-Received: by 2002:a92:d4cf:: with SMTP id o15mr63714298ilm.25.1594582679890; Sun, 12 Jul 2020 12:37:59 -0700 (PDT) MIME-Version: 1.0 From: Eytan Naim Date: Sun, 12 Jul 2020 22:37:49 +0300 Message-ID: Subject: SystemTap bpf begin probe doesn't work To: systemtap@sourceware.org X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 19:38:02 -0000 Hi, I'm trying to probe a userspace process with a 'begin' probe that doesn't seem to do anything begin.stp: probe process("a.out").begin { printf("%s %d\n", execname(), pid()) } stp output: [root@RHEL8 ~]# stap --bpf -v ~/begin.stp Pass 1: parsed user script and 56 library scripts using 203356virt/48420res/12256shr/36024data kb, in 100usr/10sys/114real ms. Pass 2: analyzed script: 2 probes, 3 functions, 0 embeds, 1 global using 204676virt/50128res/12392shr/37344data kb, in 10usr/10sys/11real ms. Pass 3: pass skipped for stapbpf runtime in 0usr/0sys/0real ms. Pass 4: compiled BPF into "stap_30984.bo" in 0usr/0sys/2real ms. Pass 5: starting run. When changing the probe to the main() function it seems to work: function.stp probe process("a.out").function("main") { printf("%s %d\n", execname(), pid()) } stap output: [root@RHEL8 ~]# stap --bpf -v ~/222.stp Pass 1: parsed user script and 56 library scripts using 203356virt/48364res/12200shr/36024data kb, in 290usr/50sys/404real ms. Pass 2: analyzed script: 2 probes, 3 functions, 0 embeds, 1 global using 204676virt/50996res/13068shr/37344data kb, in 20usr/0sys/25real ms. Pass 3: pass skipped for stapbpf runtime in 0usr/0sys/0real ms. Pass 4: compiled BPF into "stap_31782.bo" in 0usr/0sys/3real ms. Pass 5: starting run. a.out 31806 a.out 31821 a.out 31827 a.out 31831 stap version [root@RHEL8 ~]# stap --version Systemtap translator/driver (version 4.2/0.178, rpm 4.2-6.el8) Copyright (C) 2005-2019 Red Hat, Inc. and others This is free software; see the source for copying conditions. tested kernel versions: 2.6.32 ... 5.4-rc6 enabled features: AVAHI BOOST_STRING_REF DYNINST BPF JAVA PYTHON3 LIBRPM LIBSQLITE3 LIBVIRT LIBXML2 NLS NSS READLINE Needless to say that using the default backend engine works. Thanks, Eytan.