Re: [PATCH 5/5] perf tools: Add dlfilter test

From: Arnaldo Carvalho de Melo
Date: Tue Aug 10 2021 - 14:32:54 EST


Em Tue, Aug 10, 2021 at 02:48:13PM +0300, Adrian Hunter escreveu:
> Add a perf test to test the dlfilter C API.
>
> A perf.data file is synthesized and then processed by perf script with a
> dlfilter named dlfilter-test-api-v0.so. Also a C file is compiled to
> provide a dso to match the synthesized perf.data file.

[root@five ~]# perf test dlfilter
72: dlfilter C API : FAILED!
[root@five ~]# perf test -v dlfilter
72: dlfilter C API :
--- start ---
test child forked, pid 3358542
Checking for gcc
Command: gcc --version
gcc (GCC) 11.1.1 20210531 (Red Hat 11.1.1-3)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

dlfilters path: /var/home/acme/libexec/perf-core/dlfilters
Command: gcc -g -o /tmp/dlfilter-test-3358542-prog /tmp/dlfilter-test-3358542-prog.c
Creating new host machine structure
Command: /var/home/acme/bin/perf script -i /tmp/dlfilter-test-3358542-perf-data --dlfilter /var/home/acme/libexec/perf-core/dlfilters/dlfilter-test-api-v0.so --dlarg first --dlarg 1 --dlarg 4198669 --dlarg 4198662 --dlarg 0 --dlarg last
Failed with return value 139
test child finished with -1
---- end ----
dlfilter C API: FAILED!
[root@five ~]# cat /etc/redhat-release
Fedora release 34 (Thirty Four)
[root@five ~]# cat /etc/os-release
NAME=Fedora
VERSION="34.20210721.0 (Silverblue)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora 34.20210721.0 (Silverblue)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
HOME_URL="https://fedoraproject.org/";
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-silverblue/";
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help";
BUG_REPORT_URL="https://bugzilla.redhat.com/";
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=34
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=34
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy";
VARIANT="Silverblue"
VARIANT_ID=silverblue
OSTREE_VERSION='34.20210721.0'
[root@five ~]#

Trying to figure this out...

- Arnaldo