Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp33515pxb; Fri, 29 Oct 2021 05:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6A4oPsntfCPFu6RSDHSVmXk9M3GpKrgMratEVedoUoYj88ykZ0oc+NtjcbtUUJj1bPwxL X-Received: by 2002:a62:5a41:0:b0:448:152d:78bf with SMTP id o62-20020a625a41000000b00448152d78bfmr10433473pfb.77.1635510079150; Fri, 29 Oct 2021 05:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635510079; cv=none; d=google.com; s=arc-20160816; b=xKiMJFsP7XkOKEaPq15yHludMUNYzQjv2moOALwLJ9zm1JUTzuqO8PV9UHUhuUAoG8 4hqox2eMRzMC2fj45gnkfCOz9h/Lcb80SArGPMjq2SUyye9wDQq0FKT4WMDHDzvncLYT DwgcyyWMXg0Vt6pGPxF2HsFvIOXzN2/sNv5Z+pQnqMFWrY1CkuTXnoATv9VCX5khfGAy ZO/NDRR9YuBExKeqJ/8gi1LQSIUpNGfJ1K8j5aabayrWl5NaUs0eAt7fL/IiB5Pmi0UF QxV0z/avWpDY5jvLhMWVhBubUl5xQw1363qRd5SR1tiXxisOOdlhsbZvH5iWv/U1+7G2 pd9A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=73h99hJWE5OrS3nYMF4MG/2Jws/54jgP43Y5v4A9xgo=; b=br4Llc1lQOaPGmHGg7sX1yPivz13gG2gIHoQZhrmA82ZH70FKBzlBVuvYHI5cfvgzC VDs0FI7zKNMdbF+Ie7xfkHuRyn3TW4JQaDPSpUIAy8Jc/mJHYGuGF8DBO0phsLG9dxYL 3I5LLkLpRN+UJTvzOWvyeMDWUBGo5px0r9/Boy0c4ZtPG1aUMGPGzvfP9CGyjCv0RX9c z0+dXe7YkoqHziMsOdgXseDZIKY/i8RN3BMc/lB7GSA4XLl6evV0pCSJN0RCoJBozNwC YyaB41YSwNrKym552a04Hdla0APdZTwYLYChItWLqK80mgGous1ShuOrm/mhdXc5JOeU enKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AbjsF7it; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h125si2150237pgc.201.2021.10.29.05.21.05; Fri, 29 Oct 2021 05:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AbjsF7it; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231580AbhJ2MVs (ORCPT + 99 others); Fri, 29 Oct 2021 08:21:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48378 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231519AbhJ2MVi (ORCPT ); Fri, 29 Oct 2021 08:21:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635509947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=73h99hJWE5OrS3nYMF4MG/2Jws/54jgP43Y5v4A9xgo=; b=AbjsF7itlpX+SOUk+oecb8f7GHea7icinKd8PyRNdWTPr91zUceQLhsYC5Bwu1ieBFX/jC 38KaVZXuqdMomwsP+2/xGlxQoHx0HyY1oOryUD7S7xwLqYqxbqIM26EL6asR76Eclvy2YF xQAHH3uvCPj7nq2wuMWbd6CiVlYI9/4= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-554-jsz5n9DHN8qf0SwjJJmd2A-1; Fri, 29 Oct 2021 08:19:06 -0400 X-MC-Unique: jsz5n9DHN8qf0SwjJJmd2A-1 Received: by mail-wm1-f69.google.com with SMTP id v5-20020a1cac05000000b0032ccf04ba2cso2385882wme.2 for ; Fri, 29 Oct 2021 05:19:05 -0700 (PDT) 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:content-transfer-encoding :in-reply-to; bh=73h99hJWE5OrS3nYMF4MG/2Jws/54jgP43Y5v4A9xgo=; b=v3tnkaSuLTTFic+ny0l8PpfQ4Rgdm1pi1QIk3MQwGlskxCkofN1T4tVqMrmidhgHPu rLPJST3PEojuYuQAkySYKYbpxbU0TNE3PKAc3SPaf5TUXHiTohrbcv9+uf96eF1W8fLA EkLoLSo2WdTs+lq+f/j14/0FnhcbiTDlSn9mDilSfdP56QulbIvivASbU0KZ9i6yD4Fy ffSQdx+wi/Qo4Dn+ptrSgItNb9cz/myf8F4ag4q7UsAK6k3n3+fNGaHbne++VvqYnj9n t8brBxhtlKKeRxWIwkYrnYyWQhy7VEAYHGkiyFtynAxqiUWjVVwR0U+DsHYbq8rMB59+ pGUQ== X-Gm-Message-State: AOAM531cyZqeAEqgaJ/XuijA/UqR1IUsgei4woUXXyWcCSqcwVcw3Zh5 tvolYVzmGHJnRC1fOgXbDyg790+IoEFYtVF2ULNNWI1hbl8+WUX43CyF2yUGSoftJrwAeZqM9Hq 7ldJqIlVUKfKo2PId7A+0NADt X-Received: by 2002:a1c:2047:: with SMTP id g68mr10196798wmg.181.1635509944735; Fri, 29 Oct 2021 05:19:04 -0700 (PDT) X-Received: by 2002:a1c:2047:: with SMTP id g68mr10196771wmg.181.1635509944541; Fri, 29 Oct 2021 05:19:04 -0700 (PDT) Received: from krava (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id n10sm7150280wmq.24.2021.10.29.05.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 05:19:04 -0700 (PDT) Date: Fri, 29 Oct 2021 14:19:02 +0200 From: Jiri Olsa To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , Jin Yao , John Garry , "Paul A . Clarke" , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Brendan Higgins , Daniel Latypov , David Gow , eranian@google.com Subject: Re: [PATCH v2 00/22] Start aligning perf test with kunit style Message-ID: References: <20211013174604.747276-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 28, 2021 at 04:52:13PM -0700, Ian Rogers wrote: > On Wed, Oct 20, 2021 at 8:51 AM Ian Rogers wrote: > > > > On Wed, Oct 20, 2021 at 5:14 AM Jiri Olsa wrote: > > > > > > On Wed, Oct 13, 2021 at 10:45:42AM -0700, Ian Rogers wrote: > > > > Perf test uses its own structs and code layout that differs from ku= nit > > > > that was more recently introduced to the kernel. Besides consistenc= y, > > > > it is hoped that moving in the direction of kunit style will enable > > > > reuse of infrastructure like test output formatting for continuous > > > > testing systems. For example: > > > > https://lore.kernel.org/linux-kselftest/CA+GJov6tdjvY9x12JsJT14qn6c= 7NViJxqaJk+r-K1YJzPggFDQ@mail.gmail.com/ > > > > > > > > The motivation for this restructuring comes from wanting to be able= to > > > > tag tests with a size: > > > > https://lore.kernel.org/linux-perf-users/CAP-5=3DfWmGyuqFKc-EMP3rbm= TkjZ3MS+YSajGZfeRMc38HS82gw@mail.gmail.com/ > > > > To have more exhaustive and slower running tests. This isn't > > > > something kunit currently supports, nor is the execution of python = and > > > > shell tests, but it seems sensible to work on an approach with kunit > > > > rather to invent a new wheel inside of perf. > > > > > > > > These initial patches are just refactoring the main test suite > > > > definitions to be in a more kunit style. Kunit isn't depended upon,= it > > > > is hoped that this can be done in later patches for the sake of > > > > consistency. > > > > > > > > v2. Gets to a point of the perf test test suite/case structs being > > > > close facsimiles of the kunit ones. It also addresses feedback = on > > > > the v1 RFC, in particular from Jiri Olsa . > > > > > > hi, > > > when I compile with DEBUG=3D1 it's ok, but with just make: > > > > > > [root@krava perf]# ./perf test > > > Segmentation fault (core dumped) > > > [root@krava perf]# gdb ./perf > > > GNU gdb (GDB) Fedora 10.2-4.fc33 > > > Copyright (C) 2021 Free Software Foundation, Inc. > > > License GPLv3+: GNU GPL version 3 or later > > > This is free software: you are free to change and redistribute it. > > > There is NO WARRANTY, to the extent permitted by law. > > > Type "show copying" and "show warranty" for details. > > > This GDB was configured as "x86_64-redhat-linux-gnu". > > > Type "show configuration" for configuration details. > > > For bug reporting instructions, please see: > > > . > > > Find the GDB manual and other documentation resources online at: > > > . > > > > > > For help, type "help". > > > Type "apropos word" to search for commands related to "word"... > > > Reading symbols from ./perf... > > > (gdb) r test > > > Starting program: /home/jolsa/kernel/linux-perf/tools/perf/perf test > > > [Thread debugging using libthread_db enabled] > > > Using host libthread_db library "/lib64/libthread_db.so.1". > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:96 > > > 96 VPCMPEQ (%rdi), %ymm0, %ymm1 > > > Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.= 0.8-4.fc33.x86_64 cyrus-sasl-lib-2.1.27-6.fc33.x86_64 elfutils-debuginfod-c= lient-0.185-2.fc33.x86_64 elfutils-libelf-0.185-2.fc33.x86_64 elfutils-libs= -0.185-2.fc33.x86_64 keyutils-libs-1.6.1-1.fc33.x86_64 krb5-libs-1.18.2-31.= fc33.x86_64 libbabeltrace-1.5.8-3.fc33.x86_64 libbrotli-1.0.9-3.fc33.x86_64= libcap-2.48-2.fc33.x86_64 libcom_err-1.45.6-4.fc33.x86_64 libgcc-10.3.1-1.= fc33.x86_64 libidn2-2.3.2-1.fc33.x86_64 libnghttp2-1.43.0-1.fc33.x86_64 lib= psl-0.21.1-2.fc33.x86_64 libselinux-3.1-2.fc33.x86_64 libssh-0.9.6-1.fc33.x= 86_64 libunistring-0.9.10-9.fc33.x86_64 libunwind-1.4.0-4.fc33.x86_64 libuu= id-2.36.1-1.fc33.x86_64 libxcrypt-4.4.26-2.fc33.x86_64 numactl-libs-2.0.14-= 1.fc33.x86_64 openldap-2.4.50-5.fc33.x86_64 openssl-libs-1.1.1l-2.fc33.x86_= 64 pcre-8.44-2.fc33.x86_64 perl-libs-5.32.1-471.fc33.x86_64 popt-1.18-2.fc3= 3.x86_64 python2.7-2.7.18-15.fc33.x86_64 slang-2.3.2-8.fc33.x86_64 xz-libs-= 5.2.5-4.fc33.x86_64 zlib-1.2.11-23.fc33.x86_64 > > > (gdb) bt > > > #0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:96 > > > #1 0x00000000004a3848 in __cmd_test (skiplist=3D0x0, argv=3D0x7fffff= ffd6c0, argc=3D0) at tests/builtin-test.c:150 > > > #2 cmd_test (argc=3D0, argv=3D0x7fffffffd6c0) at tests/builtin-test.= c:628 > > > #3 0x00000000004cc47b in run_builtin (p=3Dp@entry=3D0xa7cda8 , argc=3Dargc@entry=3D1, argv=3Dargv@entry=3D0x7fffffffd6c0) at perf= =2Ec:313 > > > #4 0x00000000004397ae in handle_internal_command (argv=3D0x7fffffffd= 6c0, argc=3D1) at perf.c:365 > > > #5 run_argv (argv=3D, argcp=3D= ) at perf.c:409 > > > #6 main (argc=3D1, argv=3D0x7fffffffd6c0) at perf.c:539 > > > (gdb) > > > > Thanks, I'll take a look. >=20 > I wasn't able to reproduce this, I tried with gcc-10 on each patch > individually, debug disabled and O3. I can send a v3 patch set, but > currently it is just a rebase of v2. ok, I'll try to debug that if I can still reproduce jirka