Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp782598pxb; Wed, 3 Nov 2021 12:18:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaUZjNsGhxqC7RE3A5A5my+5pIA3klgeqkmMgHEP7SIJgALhsoyGANdVttoAGhkYUSPEp3 X-Received: by 2002:a05:6602:1688:: with SMTP id s8mr16948586iow.72.1635967087768; Wed, 03 Nov 2021 12:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635967087; cv=none; d=google.com; s=arc-20160816; b=a1rRCXRfDRZdVTp5JZOA+Mmmx8aBEwM89FRazWfxJ1zCCYYbIB+53LAf3Zh+QOgEfC Rf8vN+je/Osac5ff1R1KEoZraXlmmn45ITYY73nly/gNZkpe+6p5PNEyLysv41JIRNbx ruRfqPAf/MgJUZEEx9mTgfwjFJCo/6gr9PLd3nasfnhsu4ILYaJ4VceCb2ZTOpB0pWee 2wzM8jLrfblzqtdOxSTNje7aV/FLnwVQDJCzQybahKk6hOle9C1ptg9qkxEdCPaPXsd1 o1xRp7XPIBXuezBJCfUN2Xwa7CBx0Cr9o03jORjXjJwJfwWCOQQLKj7snO9sNJ9ZyV4Q kmmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zvN8Wx3cerlS5kndbX104hKLH3gFaS6msaaX+fbSIaA=; b=cyuAl8zkQHirDvJCz1+vpZ11/lWI9q0VpiL06xWV2f9iObWJTwv9XJyavejzb3yeYz IfIJvHhhUDvDz8x5vaUSpyUyOVLzFuWeKuly37osSftj91igDakjURSesfBaJ13xTxyi Q4yqvAiYOjmSSYC6ViWxyN3Gn6bjQGvIu7AkeDSYK+mudKKWntD+gOxbtK6vukZNZu6P 7RRXgSXQsT7pnVMYTiZ1l1n97u+cynXRtv5WOJJwgEuV69DfrsUENfr507KkWkDnAHEd 9HTvWivlmcGdNYYbBWowIjqaVFEWu9tqSmdZqBRQWRtApi752vfKAZZpRdF55kEqFdc+ abJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="sn/PLQIB"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si3928793iol.40.2021.11.03.12.17.54; Wed, 03 Nov 2021 12:18:07 -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=@google.com header.s=20210112 header.b="sn/PLQIB"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230248AbhKCTSP (ORCPT + 99 others); Wed, 3 Nov 2021 15:18:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbhKCTSO (ORCPT ); Wed, 3 Nov 2021 15:18:14 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26A7FC061203 for ; Wed, 3 Nov 2021 12:15:38 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id v65so4129798ioe.5 for ; Wed, 03 Nov 2021 12:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zvN8Wx3cerlS5kndbX104hKLH3gFaS6msaaX+fbSIaA=; b=sn/PLQIBmfI06w/WOGfSjv9Kw13j3swiXnsEhqgCbHbteMIUbCOen4UyZk0AH6wWkN 1IEIFq5KLrsfJ2vFFB03I0IsLZJ3JX06eusxHqxIXlIbbh2gBJB2ILDk+KUJQFyAmexf uRPiqcTti8SZbHRBQPMCfp5tI16Y+UuyXeiTdP9hdG8LLMUPgUqQcmP1Afl5ijYH6dlw Tt3gYdC0zn2cteKEyCdxxc0CMv7mUfSu0TAW93Y5J894XHqwomsaHv3udZdWMj48Agpx d/4Pw/YNf6ct+1vVYr0RpRpk64LD/B6UHvCDqr9fdH/d82D9Jr1G1E1FR+vJlY2JQGMM gc0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zvN8Wx3cerlS5kndbX104hKLH3gFaS6msaaX+fbSIaA=; b=7EZg5WQ8G9DZW+0VDEVB2tFF8CHHhCMpUZsBBF8stKdwDGbIJ0WibVQDegw8JqOrrl m/Air2dQvJwlr0sHV5/WJNvCtB+TD6TJ253A15wcNreEMxGHYNtG/4VSPN5bfvATrN0z 04fqWyE9aW7YuBngkGhLR/W51nP79E2t8Yd4cxRsRnaIpsjeMKvD+rrpDwyI/rKCnxfJ Yol33cKqp/e4+7TfZlGOd/HcTAPaPu5YJ3CmYaQMouF+1l+zzR2HCttbK6JnC3etHAOP SBsu3O9B8m7Nb9qIzw9duK0YUB8i30x58iqs5f/qHAbPJuqZdgzSPqXfSI/drL1AJjx9 Vy7g== X-Gm-Message-State: AOAM532bqZwBQwClz7vqfUS8lgJ5cgCjfjZjBEdbQj6CSqDBTISteZrz 2gZpsbpGTi07YbvXX+qtvTVVBEwV/tbPDRJpvPy0lQ== X-Received: by 2002:a05:6602:2d88:: with SMTP id k8mr22838002iow.18.1635966937329; Wed, 03 Nov 2021 12:15:37 -0700 (PDT) MIME-Version: 1.0 References: <20211013174604.747276-1-irogers@google.com> In-Reply-To: From: Ian Rogers Date: Wed, 3 Nov 2021 12:15:23 -0700 Message-ID: Subject: Re: [PATCH v2 00/22] Start aligning perf test with kunit style To: Jiri Olsa , Sohaib Mohamed 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 29, 2021 at 5:19 AM Jiri Olsa wrote: > > 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 = kunit > > > > > that was more recently introduced to the kernel. Besides consiste= ncy, > > > > > it is hoped that moving in the direction of kunit style will enab= le > > > > > reuse of infrastructure like test output formatting for continuou= s > > > > > testing systems. For example: > > > > > https://lore.kernel.org/linux-kselftest/CA+GJov6tdjvY9x12JsJT14qn= 6c7NViJxqaJk+r-K1YJzPggFDQ@mail.gmail.com/ > > > > > > > > > > The motivation for this restructuring comes from wanting to be ab= le to > > > > > tag tests with a size: > > > > > https://lore.kernel.org/linux-perf-users/CAP-5=3DfWmGyuqFKc-EMP3r= bmTkjZ3MS+YSajGZfeRMc38HS82gw@mail.gmail.com/ > > > > > To have more exhaustive and slower running tests. This isn't > > > > > something kunit currently supports, nor is the execution of pytho= n and > > > > > shell tests, but it seems sensible to work on an approach with ku= nit > > > > > 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 upo= n, 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 bein= g > > > > > close facsimiles of the kunit ones. It also addresses feedbac= k 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 tes= t > > > > [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= -client-0.185-2.fc33.x86_64 elfutils-libelf-0.185-2.fc33.x86_64 elfutils-li= bs-0.185-2.fc33.x86_64 keyutils-libs-1.6.1-1.fc33.x86_64 krb5-libs-1.18.2-3= 1.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 l= ibpsl-0.21.1-2.fc33.x86_64 libselinux-3.1-2.fc33.x86_64 libssh-0.9.6-1.fc33= .x86_64 libunistring-0.9.10-9.fc33.x86_64 libunwind-1.4.0-4.fc33.x86_64 lib= uuid-2.36.1-1.fc33.x86_64 libxcrypt-4.4.26-2.fc33.x86_64 numactl-libs-2.0.1= 4-1.fc33.x86_64 openldap-2.4.50-5.fc33.x86_64 openssl-libs-1.1.1l-2.fc33.x8= 6_64 pcre-8.44-2.fc33.x86_64 perl-libs-5.32.1-471.fc33.x86_64 popt-1.18-2.f= c33.x86_64 python2.7-2.7.18-15.fc33.x86_64 slang-2.3.2-8.fc33.x86_64 xz-lib= s-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:9= 6 > > > > #1 0x00000000004a3848 in __cmd_test (skiplist=3D0x0, argv=3D0x7fff= ffffd6c0, argc=3D0) at tests/builtin-test.c:150 > > > > #2 cmd_test (argc=3D0, argv=3D0x7fffffffd6c0) at tests/builtin-tes= t.c:628 > > > > #3 0x00000000004cc47b in run_builtin (p=3Dp@entry=3D0xa7cda8 , argc=3Dargc@entry=3D1, argv=3Dargv@entry=3D0x7fffffffd6c0) at pe= rf.c:313 > > > > #4 0x00000000004397ae in handle_internal_command (argv=3D0x7ffffff= fd6c0, 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. > > > > 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 Thanks to Sohaib I have a reproduction now, and it looks like there are a bunch of issues to fix in v3. Thanks, Ian