1. 03 Jul, 2020 11 commits
    • Adrian Hunter's avatar
      perf record: Fix duplicated sideband events with Intel PT system wide tracing · 442ad225
      Adrian Hunter authored
      Commit 0a892c1c ("perf record: Add dummy event during system wide
      synthesis") reveals an issue with Intel PT system wide tracing.
      Specifically that Intel PT already adds a dummy tracking event, and it
      is not the first event.  Adding another dummy tracking event causes
      duplicated sideband events.  Fix by checking for an existing dummy
      tracking event first.
      
      Example showing duplicated switch events:
      
       Before:
      
         # perf record -a -e intel_pt//u uname
         Linux
         [ perf record: Woken up 1 times to write data ]
         [ perf record: Captured and wrote 0.895 MB perf.data ]
         # perf script --no-itrace --show-switch-events | head
                  swapper     0 [007]  6390.516222: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                  swapper     0 [007]  6390.516222: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [007]  6390.516223: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [007]  6390.516224: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [007]  6390.516227: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                rcu_sched    11 [007]  6390.516227: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [007]  6390.516228: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [007]  6390.516228: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [002]  6390.516415: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  5556/5559
                  swapper     0 [002]  6390.516416: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  5556/5559
      
       After:
      
         # perf record -a -e intel_pt//u uname
         Linux
         [ perf record: Woken up 1 times to write data ]
         [ perf record: Captured and wrote 0.868 MB perf.data ]
         #  perf script --no-itrace --show-switch-events | head
                  swapper     0 [005]  6450.567013: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  7179/7181
                     perf  7181 [005]  6450.567014: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                     perf  7181 [005]  6450.567028: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [005]  6450.567029: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:  7179/7181
                  swapper     0 [005]  6450.571699: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [005]  6450.571700: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [005]  6450.571702: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [005]  6450.571703: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [005]  6450.579703: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [005]  6450.579704: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200629091955.17090-3-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      442ad225
    • Adrian Hunter's avatar
      perf scripts python: export-to-postgresql.py: Fix struct.pack() int argument · 640432e6
      Adrian Hunter authored
      Python 3.8 is requiring that arguments being packed as integers are also
      integers.  Add int() accordingly.
      
       Before:
      
         $ perf record -e intel_pt//u uname
         $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-postgresql.py perf_data_db branches calls
         2020-06-25 16:09:10.547256 Creating database...
         2020-06-25 16:09:10.733185 Writing to intermediate files...
         Traceback (most recent call last):
           File "/home/ahunter/libexec/perf-core/scripts/python/export-to-postgresql.py", line 1106, in synth_data
             cbr(id, raw_buf)
           File "/home/ahunter/libexec/perf-core/scripts/python/export-to-postgresql.py", line 1058, in cbr
             value = struct.pack("!hiqiiiiii", 4, 8, id, 4, cbr, 4, MHz, 4, percent)
         struct.error: required argument is not an integer
         Fatal Python error: problem in Python trace event handler
         Python runtime state: initialized
      
         Current thread 0x00007f35d3695780 (most recent call first):
         <no Python frame>
         Aborted (core dumped)
      
       After:
      
         $ dropdb perf_data_db
         $ rm -rf perf_data_db-perf-data
         $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-postgresql.py perf_data_db branches calls
         2020-06-25 16:09:40.990267 Creating database...
         2020-06-25 16:09:41.207009 Writing to intermediate files...
         2020-06-25 16:09:41.270915 Copying to database...
         2020-06-25 16:09:41.382030 Removing intermediate files...
         2020-06-25 16:09:41.384630 Adding primary keys
         2020-06-25 16:09:41.541894 Adding foreign keys
         2020-06-25 16:09:41.677044 Dropping unused tables
         2020-06-25 16:09:41.703761 Done
      
      Fixes: aba44287 ("perf scripts python: export-to-postgresql.py: Export Intel PT power and ptwrite events")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-2-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      640432e6
    • Arnaldo Carvalho de Melo's avatar
      tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy' · eb25de27
      Arnaldo Carvalho de Melo authored
      To bring in the change made in this cset:
      
        e3a9e681 ("x86/entry: Fixup bad_iret vs noinstr")
      
      This doesn't cause any functional changes to tooling, just a rebuild.
      
      Addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
        diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eb25de27
    • Arnaldo Carvalho de Melo's avatar
      Merge remote-tracking branch 'torvalds/master' into perf/urgent · 9434628f
      Arnaldo Carvalho de Melo authored
      To synchronize UAPI headers.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9434628f
    • Linus Torvalds's avatar
      Merge tag 'm68knommu-for-v5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · cdd3bb54
      Linus Torvalds authored
      Pull m68knommu mm fixes from Greg Ungerer:
       "Two critical mm related fixes that affect booting of m68k/ColdFire
        devices.
      
        Both fix problems caused by recent system init memblock changes"
      
      * tag 'm68knommu-for-v5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: mm: fix node memblock init
        m68k: nommu: register start of the memory with memblock
      cdd3bb54
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 684c8ccc
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Sync dtc to upstream to pick up fixes for I2C bus checks and quiet
         warnings
      
       - Various fixes for DT binding check warnings
      
       - A couple of build fixes/improvements for binding checks
      
       - ReST formatting improvements for writing-schema.rst
      
       - Document reference fixes
      
      * tag 'devicetree-fixes-for-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: clock: imx: Fix e-mail address
        dt-bindings: thermal: k3: Fix the reg property
        dt-bindings: thermal: Remove soc unit address
        dt-bindings: display: arm: versatile: Pass the sysreg unit name
        dt-bindings: usb: aspeed: Remove the leading zeroes
        dt-bindings: copy process-schema-examples.yaml to process-schema.yaml
        dt-bindings: do not build processed-schema.yaml for 'make dt_binding_check'
        dt-bindings: fix error in 'make clean' after 'make dt_binding_check'
        dt-bindings: mailbox: zynqmp_ipi: fix unit address
        dt-bindings: bus: uniphier-system-bus: fix warning in example
        scripts/dtc: Update to upstream version v1.6.0-11-g9d7888cbf19c
        doc: devicetree: bindings: fix spelling mistake
        docs: dt: minor adjustments at writing-schema.rst
        dt: fix reference to olpc,xo1.75-ec.txt
        dt: Fix broken references to renamed docs
        dt: fix broken links due to txt->yaml renames
        dt: update a reference for reneases pcar file renamed to yaml
      684c8ccc
    • Linus Torvalds's avatar
      Merge tag 'for-linus-2020-07-02' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · 45564bcd
      Linus Torvalds authored
      Pull data race annotation from Christian Brauner:
       "This contains an annotation patch for a data race in copy_process()
        reported by KCSAN when reading and writing nr_threads.
      
        The data race is intentional and benign. This is obvious from the
        comment above the relevant code and based on general consensus when
        discussing this issue. So simply using data_race() to annotate this as
        an intentional race seems the best option"
      
      * tag 'for-linus-2020-07-02' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        fork: annotate data race in copy_process()
      45564bcd
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-next-v5.8-rc4' of git://git.infradead.org/users/jjs/linux-tpmdd · 0c7415c3
      Linus Torvalds authored
      Pull tpm fixes from Jarkko Sakkinen:
       "These are just fixes for bugs found lately.
      
        All of them are small scale things here and there, and all of them are
        for previous kernel releases (the oldest appeared in v2.6.17)"
      
      * tag 'tpmdd-next-v5.8-rc4' of git://git.infradead.org/users/jjs/linux-tpmdd:
        tpm_tis: Remove the HID IFX0102
        tpm_tis_spi: Prefer async probe
        tpm: ibmvtpm: Wait for ready buffer before probing for TPM2 attributes
        tpm/st33zp24: fix spelling mistake "drescription" -> "description"
        tpm_tis: extra chip->ops check on error path in tpm_tis_core_init
        tpm_tis_spi: Don't send anything during flow control
        tpm: Fix TIS locality timeout problems
      0c7415c3
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-fixes-5.8-rc4' of... · 0dce8845
      Linus Torvalds authored
      Merge tag 'linux-kselftest-fixes-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "tpm test fixes from Jarkko Sakkinen"
      
      * tag 'linux-kselftest-fixes-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: tpm: Use /bin/sh instead of /bin/bash
        selftests: tpm: Use 'test -e' instead of 'test -f'
        Revert "tpm: selftest: cleanup after unseal with wrong auth/policy test"
      0dce8845
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-kunit-fixes-5.8-rc4' of... · 55844741
      Linus Torvalds authored
      Merge tag 'linux-kselftest-kunit-fixes-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kunit fixes from Shuah Khan
       "Fixes for build and run-times failures.
      
        Also includes troubleshooting tips updates to kunit user
        documentation"
      
      * tag 'linux-kselftest-kunit-fixes-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        Documentation: kunit: Add some troubleshooting tips to the FAQ
        kunit: kunit_tool: Fix invalid result when build fails
        kunit: show error if kunit results are not present
        kunit: kunit_config: Fix parsing of CONFIG options with space
      55844741
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.8-1' of git://linux-nfs.org/~bfields/linux · 083176c8
      Linus Torvalds authored
      Pull nfsd fixes from Bruce Fields:
       "Fixes for a umask bug on exported filesystems lacking ACL support, a
        leak and a module unloading bug in the /proc/fs/nfsd/clients/ code,
        and a compile warning"
      
      * tag 'nfsd-5.8-1' of git://linux-nfs.org/~bfields/linux:
        SUNRPC: Add missing definition of ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
        nfsd: fix nfsdfs inode reference count leak
        nfsd4: fix nfsdfs reference count loop
        nfsd: apply umask on fs without ACL support
      083176c8
  2. 02 Jul, 2020 9 commits
  3. 01 Jul, 2020 3 commits
  4. 30 Jun, 2020 15 commits
  5. 29 Jun, 2020 2 commits