1. 21 4月, 2022 3 次提交
  2. 18 4月, 2022 15 次提交
  3. 14 4月, 2022 2 次提交
  4. 12 4月, 2022 3 次提交
    • C
      perf test: Shell - Limit to only run executable scripts in tests · 41204da4
      Carsten Haitzler 提交于
      'perf test''s shell runner will just run everything in the tests
      directory (as long as it's not another directory or does not begin
      with a dot), but sometimes you find files in there that are not shell
      scripts - perf.data output for example if you do some testing and then
      the next time you run perf test it tries to run these.
      
      Check the files are executable so they are actually intended to be test
      scripts and not just some "random junk" files there.
      Signed-off-by: NCarsten Haitzler <carsten.haitzler@arm.com>
      Reviewed-by: NLeo Yan <leo.yan@linaro.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: coresight@lists.linaro.org
      Link: http://lore.kernel.org/lkml/20220309122859.31487-1-carsten.haitzler@foss.arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      41204da4
    • E
      perf scripting python: Expose symbol offset and source information · ae24e9b5
      Eelco Chaudron 提交于
      This change adds the symbol offset to the data exported for each
      call-chain entry. This can not be calculated from the script and
      only the ip value, and no related mmap information.
      
      In addition, also export the source file and line information, if
      available, to avoid an external lookup if this information is needed.
      Signed-off-by: NEelco Chaudron <echaudro@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/164554263724.752731.14651017093796049736.stgit@wsfd-netdev64.ntdv.lab.eng.bos.redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ae24e9b5
    • E
      perf jitdump: Add riscv64 support · 335f70fa
      Eric Lin 提交于
      This patch enables perf jitdump for riscv64 and was tested with V8 on
      qemu rv64.
      
      Qemu rv64:
      
        $ perf record -e cpu-clock -c 1000 -g -k mono ./d8_rv64 --perf-prof --no-write-protect-code-memory test.js
        $ perf inject -j -i perf.data -o perf.data.jitted
        $ perf report -i perf.data.jitted
      
      Output:
      
        To display the perf.data header info, please use --header/--header-only options.
      
        Total Lost Samples: 0
      
        Samples: 87K of event 'cpu-clock'
        Event count (approx.): 87974000
      
        Children  Self   Command   Shared Object      Symbol
      
        ....
         0.28%    0.06%  d8_rv64   d8_rv64            [.] _ZN2v88internal6WasmJs7InstallEPNS0_7IsolateEb
         0.28%    0.00%  d8_rv64   d8_rv64            [.] _ZN2v88internal10ParserBaseINS0_6ParserEE22ParseLogicalExpressionEv
         0.28%    0.03%  d8_rv64   jitted-112-76.so   [.] Builtin:InterpreterEntryTrampoline
         0.12%    0.00%  d8_rv64   d8_rv64            [.] _ZN2v88internal19ContextDeserializer11DeserializeEPNS0_7IsolateENS0_6HandleINS0_13JSGlobalProxyEEENS_33DeserializeInternalFieldsCallbackE
         0.12%    0.01%  d8_rv64   jitted-112-651.so  [.] Builtin:CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit
        ....
      Signed-off-by: NEric Lin <eric.lin@sifive.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: greentime.hu@sifive.com
      Cc: linux-riscv@lists.infradead.org
      Link: http://lore.kernel.org/lkml/20220406142606.18464-2-eric.lin@sifive.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      335f70fa
  5. 10 4月, 2022 4 次提交
  6. 09 4月, 2022 13 次提交
    • A
      perf bench: Fix epoll bench to correct usage of affinity for machines with #CPUs > 1K · 299687e1
      Athira Rajeev 提交于
      The 'perf bench epoll' testcase fails on systems with more than 1K CPUs.
      
      Testcase: perf bench epoll all
      
      Result snippet:
      <<>>
      Run summary [PID 106497]: 1399 threads monitoring on 64 file-descriptors for 8 secs.
      
      perf: pthread_create: No such file or directory
      <<>>
      
      In epoll benchmarks (ctl, wait) pthread_create is invoked in do_threads
      from respective bench_epoll_*  function. Though the logs shows direct
      failure from pthread_create, the actual failure is from
      "sched_setaffinity" returning EINVAL (invalid argument).
      
      This happens because the default mask size in glibc is 1024. To overcome
      this 1024 CPUs mask size limitation of cpu_set_t, change the mask size
      using the CPU_*_S macros.
      
      Patch addresses this by fixing all the epoll benchmarks to use CPU_ALLOC
      to allocate cpumask, CPU_ALLOC_SIZE for size, and CPU_SET_S to set the
      mask.
      Reported-by: NDisha Goel <disgoel@linux.vnet.ibm.com>
      Signed-off-by: NAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Tested-by: NDisha Goel <disgoel@linux.vnet.ibm.com>
      Acked-by: NIan Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: https://lore.kernel.org/r/20220406175113.87881-3-atrajeev@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      299687e1
    • A
      perf bench: Fix futex bench to correct usage of affinity for machines with #CPUs > 1K · c9c2a427
      Athira Rajeev 提交于
      The 'perf bench futex' testcase fails on systems with more than 1K CPUs.
      
      Testcase: perf bench futex all
      
      Failure snippet:
      <<>>Running futex/hash benchmark...
      
      perf: pthread_create: No such file or directory
      <<>>
      
      All the futex benchmarks (ie hash, lock-api, requeue, wake,
      wake-parallel), pthread_create is invoked in respective bench_futex_*
      function. Though the logs shows direct failure from pthread_create,
      strace logs showed that actual failure is from  "sched_setaffinity"
      returning EINVAL (invalid argument).
      
      This happens because the default mask size in glibc is 1024. To overcome
      this 1024 CPUs mask size limitation of cpu_set_t, change the mask size
      using the CPU_*_S macros.
      
      Patch addresses this by fixing all the futex benchmarks to use CPU_ALLOC
      to allocate cpumask, CPU_ALLOC_SIZE for size, and CPU_SET_S to set the
      mask.
      Reported-by: NDisha Goel <disgoel@linux.vnet.ibm.com>
      Reviewed-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Signed-off-by: NAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Tested-by: NDisha Goel <disgoel@linux.vnet.ibm.com>
      Acked-by: NIan Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: https://lore.kernel.org/r/20220406175113.87881-2-atrajeev@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c9c2a427
    • A
      perf tools: Fix perf's libperf_print callback · aeee9dc5
      Adrian Hunter 提交于
      eprintf() does not expect va_list as the type of the 4th parameter.
      
      Use veprintf() because it does.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Fixes: 428dab81 ("libperf: Merge libperf_set_print() into libperf_init()")
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: https://lore.kernel.org/r/20220408132625.2451452-1-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      aeee9dc5
    • J
      perf: arm-spe: Fix perf report --mem-mode · ffab4870
      James Clark 提交于
      Since commit bb30acae ("perf report: Bail out --mem-mode if mem
      info is not available") "perf mem report" and "perf report --mem-mode"
      don't allow opening the file unless one of the events has
      PERF_SAMPLE_DATA_SRC set.
      
      SPE doesn't have this set even though synthetic memory data is generated
      after it is decoded. Fix this issue by setting DATA_SRC on SPE events.
      This has no effect on the data collected because the SPE driver doesn't
      do anything with that flag and doesn't generate samples.
      
      Fixes: bb30acae ("perf report: Bail out --mem-mode if mem info is not available")
      Signed-off-by: NJames Clark <james.clark@arm.com>
      Tested-by: NLeo Yan <leo.yan@linaro.org>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20220408144056.1955535-1-james.clark@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ffab4870
    • J
      perf unwind: Don't show unwind error messages when augmenting frame pointer stack · fa7095c5
      James Clark 提交于
      Commit Fixes: b9f6fbb3 ("perf arm64: Inject missing frames when
      using 'perf record --call-graph=fp'") intended to add a 'best effort'
      DWARF unwind that improved the frame pointer stack in most scenarios.
      
      It's expected that the unwind will fail sometimes, but this shouldn't be
      reported as an error. It only works when the return address can be
      determined from the contents of the link register alone.
      
      Fix the error shown when the unwinder requires extra registers by adding
      a new flag that suppresses error messages. This flag is not set in the
      normal --call-graph=dwarf unwind mode so that behavior is not changed.
      
      Fixes: b9f6fbb3 ("perf arm64: Inject missing frames when using 'perf record --call-graph=fp'")
      Reported-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NJames Clark <james.clark@arm.com>
      Tested-by: NJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexandre Truong <alexandre.truong@arm.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20220406145651.1392529-1-james.clark@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fa7095c5
    • A
      tools headers arm64: Sync arm64's cputype.h with the kernel sources · 278aaba2
      Arnaldo Carvalho de Melo 提交于
      To get the changes in:
      
        83bea32a ("arm64: Add part number for Arm Cortex-A78AE")
      
      That addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h'
        diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
      
      Cc: Ali Saidi <alisaidi@amazon.com>
      Cc: Andrew Kilroy <andrew.kilroy@arm.com>
      Cc: Chanho Park <chanho61.park@samsung.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Will Deacon <will@kernel.org>
      Link: http://lore.kernel.org/lkml/Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      278aaba2
    • C
      perf test tsc: Fix error message when not supported · 290fa68b
      Chengdong Li 提交于
      By default `perf test tsc` does not return the error message when the
      child process detected kernel does not support it. Instead, the child
      process prints an error message to stderr, unfortunately stderr is
      redirected to /dev/null when verbose <= 0.
      
      This patch does:
      
      - return TEST_SKIP to the parent process instead of TEST_OK when
        perf_read_tsc_conversion() is not supported.
      
      - Add a new subtest of testing if TSC is supported on current
        architecture by moving exist code to a separate function.
        It avoids two places in test__perf_time_to_tsc() that return
        TEST_SKIP by doing this.
      
      - Extend the test suite definition to contain above two subtests.
        Current test_suite and test_case structs do not support printing skip
        reason when the number of subtest less than 1. To print skip reason, it
        is necessary to extend current test suite definition.
      Reviewed-by: NAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: NChengdong Li <chengdongli@tencent.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: likexu@tencent.com
      Link: https://lore.kernel.org/r/20220408084748.43707-1-chengdongli@tencent.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      290fa68b
    • A
      perf build: Don't use -ffat-lto-objects in the python feature test when building with clang-13 · 3a8a0475
      Arnaldo Carvalho de Melo 提交于
      Using -ffat-lto-objects in the python feature test when building with
      clang-13 results in:
      
        clang-13: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
        error: command '/usr/sbin/clang' failed with exit code 1
        cp: cannot stat '/tmp/build/perf/python_ext_build/lib/perf*.so': No such file or directory
        make[2]: *** [Makefile.perf:639: /tmp/build/perf/python/perf.so] Error 1
      
      Noticed when building on a docker.io/library/archlinux:base container.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Fangrui Song <maskray@google.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Keeping <john@metanate.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Sedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3a8a0475
    • A
      perf python: Fix probing for some clang command line options · dd6e1fe9
      Arnaldo Carvalho de Melo 提交于
      The clang compiler complains about some options even without a source
      file being available, while others require one, so use the simple
      tools/build/feature/test-hello.c file.
      
      Then check for the "is not supported" string in its output, in addition
      to the "unknown argument" already being looked for.
      
      This was noticed when building with clang-13 where -ffat-lto-objects
      isn't supported and since we were looking just for "unknown argument"
      and not providing a source code to clang, was mistakenly assumed as
      being available and not being filtered to set of command line options
      provided to clang, leading to a build failure.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Fangrui Song <maskray@google.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Keeping <john@metanate.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Sedat Dilek <sedat.dilek@gmail.com>
      Link: http://lore.kernel.org/lkml/Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      dd6e1fe9
    • A
      tools build: Filter out options and warnings not supported by clang · 41caff45
      Arnaldo Carvalho de Melo 提交于
      These make the feature check fail when using clang, so remove them just
      like is done in tools/perf/Makefile.config to build perf itself.
      
      Adding -Wno-compound-token-split-by-macro to tools/perf/Makefile.config
      when building with clang is also necessary to avoid these warnings
      turned into errors (-Werror):
      
          CC      /tmp/build/perf/util/scripting-engines/trace-event-perl.o
        In file included from util/scripting-engines/trace-event-perl.c:35:
        In file included from /usr/lib64/perl5/CORE/perl.h:4085:
        In file included from /usr/lib64/perl5/CORE/hv.h:659:
        In file included from /usr/lib64/perl5/CORE/hv_func.h:34:
        In file included from /usr/lib64/perl5/CORE/sbox32_hash.h:4:
        /usr/lib64/perl5/CORE/zaphod32_hash.h:150:5: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
            ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /usr/lib64/perl5/CORE/zaphod32_hash.h:80:38: note: expanded from macro 'ZAPHOD32_SCRAMBLE32'
        #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
                                             ^~~~~~~~~~
        /usr/lib64/perl5/CORE/perl.h:737:29: note: expanded from macro 'STMT_START'
        #   define STMT_START   (void)( /* gcc supports "({ STATEMENTS; })" */
                                      ^
        /usr/lib64/perl5/CORE/zaphod32_hash.h:150:5: note: '{' token is here
            ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /usr/lib64/perl5/CORE/zaphod32_hash.h:80:49: note: expanded from macro 'ZAPHOD32_SCRAMBLE32'
        #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
                                                        ^
        /usr/lib64/perl5/CORE/zaphod32_hash.h:150:5: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
            ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /usr/lib64/perl5/CORE/zaphod32_hash.h:87:41: note: expanded from macro 'ZAPHOD32_SCRAMBLE32'
            v ^= (v>>23);                       \
                                                ^
        /usr/lib64/perl5/CORE/zaphod32_hash.h:150:5: note: ')' token is here
            ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /usr/lib64/perl5/CORE/zaphod32_hash.h:88:3: note: expanded from macro 'ZAPHOD32_SCRAMBLE32'
        } STMT_END
          ^~~~~~~~
        /usr/lib64/perl5/CORE/perl.h:738:21: note: expanded from macro 'STMT_END'
        #   define STMT_END     )
                                ^
      
      Please refer to the discussion on the Link: tag below, where Nathan
      clarifies the situation:
      
      <quote>
      acme> And then get to the problems at the end of this message, which seem
      acme> similar to the problem described here:
      acme>
      acme> From  Nathan Chancellor <>
      acme> Subject	[PATCH] mwifiex: Remove unnecessary braces from HostCmd_SET_SEQ_NO_BSS_INFO
      acme>
      acme> https://lkml.org/lkml/2020/9/1/135
      acme>
      acme> So perhaps in this case its better to disable that
      acme> -Werror,-Wcompound-token-split-by-macro when building with clang?
      
      Yes, I think that is probably the best solution. As far as I can tell,
      at least in this file and context, the warning appears harmless, as the
      "create a GNU C statement expression from two different macros" is very
      much intentional, based on the presence of PERL_USE_GCC_BRACE_GROUPS.
      The warning is fixed in upstream Perl by just avoiding creating GNU C
      statement expressions using STMT_START and STMT_END:
      
        https://github.com/Perl/perl5/issues/18780
        https://github.com/Perl/perl5/pull/18984
      
      If I am reading the source code correctly, an alternative to disabling
      the warning would be specifying -DPERL_GCC_BRACE_GROUPS_FORBIDDEN but it
      seems like that might end up impacting more than just this site,
      according to the issue discussion above.
      </quote>
      Based-on-a-patch-by: NSedat Dilek <sedat.dilek@gmail.com>
      Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # Debian/Selfmade LLVM-14 (x86-64)
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Fangrui Song <maskray@google.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Keeping <john@metanate.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Link: http://lore.kernel.org/lkml/YkxWcYzph5pC1EK8@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      41caff45
    • A
      tools build: Use $(shell ) instead of `` to get embedded libperl's ccopts · 541f695c
      Arnaldo Carvalho de Melo 提交于
      Just like its done for ldopts and for both in tools/perf/Makefile.config.
      
      Using `` to initialize PERL_EMBED_CCOPTS somehow precludes using:
      
        $(filter-out SOMETHING_TO_FILTER,$(PERL_EMBED_CCOPTS))
      
      And we need to do it to allow for building with versions of clang where
      some gcc options selected by distros are not available.
      
      Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # Debian/Selfmade LLVM-14 (x86-64)
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Fangrui Song <maskray@google.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Keeping <john@metanate.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Link: http://lore.kernel.org/lkml/YktYX2OnLtyobRYD@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      541f695c
    • A
      tools include UAPI: Sync linux/vhost.h with the kernel sources · 940442de
      Arnaldo Carvalho de Melo 提交于
      To get the changes in:
      
        b04d910a ("vdpa: support exposing the count of vqs to userspace")
        a61280dd ("vdpa: support exposing the config size to userspace")
      
      Silencing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h'
        diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h
      
        $ diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h
        --- tools/include/uapi/linux/vhost.h	2021-07-15 16:17:01.840818309 -0300
        +++ include/uapi/linux/vhost.h	2022-04-02 18:55:05.702522387 -0300
        @@ -150,4 +150,11 @@
         /* Get the valid iova range */
         #define VHOST_VDPA_GET_IOVA_RANGE	_IOR(VHOST_VIRTIO, 0x78, \
         					     struct vhost_vdpa_iova_range)
        +
        +/* Get the config size */
        +#define VHOST_VDPA_GET_CONFIG_SIZE	_IOR(VHOST_VIRTIO, 0x79, __u32)
        +
        +/* Get the count of all virtqueues */
        +#define VHOST_VDPA_GET_VQS_COUNT	_IOR(VHOST_VIRTIO, 0x80, __u32)
        +
         #endif
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before
        $ cp include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after
        $ diff -u before after
        --- before	2022-04-04 14:52:25.036375145 -0300
        +++ after	2022-04-04 14:52:31.906549976 -0300
        @@ -38,4 +38,6 @@
         	[0x73] = "VDPA_GET_CONFIG",
         	[0x76] = "VDPA_GET_VRING_NUM",
         	[0x78] = "VDPA_GET_IOVA_RANGE",
        +	[0x79] = "VDPA_GET_CONFIG_SIZE",
        +	[0x80] = "VDPA_GET_VQS_COUNT",
         };
        $
      
      Cc: Longpeng <longpeng2@huawei.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Link: https://lore.kernel.org/lkml/YksxoFcOARk%2Fldev@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      940442de
    • D
      tools/testing/nvdimm: Fix security_init() symbol collision · e8cf229e
      Dan Williams 提交于
      Starting with the new perf-event support in the nvdimm core, the
      nfit_test mock module stops compiling. Rename its security_init() to
      nfit_security_init().
      
      tools/testing/nvdimm/test/nfit.c:1845:13: error: conflicting types for ‘security_init’; have ‘void(struct nfit_test *)’
       1845 | static void security_init(struct nfit_test *t)
            |             ^~~~~~~~~~~~~
      In file included from ./include/linux/perf_event.h:61,
                       from ./include/linux/nd.h:11,
                       from ./drivers/nvdimm/nd-core.h:11,
                       from tools/testing/nvdimm/test/nfit.c:19:
      
      Fixes: 9a61d083 ("drivers/nvdimm: Add nvdimm pmu structure")
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Reviewed-by: NKajol Jain <kjain@linux.ibm.com>
      Reviewed-by: NVishal Verma <vishal.l.verma@intel.com>
      Link: https://lore.kernel.org/r/164904238610.1330275.1889212115373993727.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: NDan Williams <dan.j.williams@intel.com>
      e8cf229e