perf/urgent fixes:

Core libraries:

  Jiri Olsa:

  - Fix max perf_event_attr.precise_ip detection.

  Kan Liang:

  - Fix parser error for uncore event alias

  Wei Lin:

  - Fixup ordering of kernel maps after obtaining the main kernel map address.

Intel PT:

  Adrian Hunter:

  - Fix TSC slip where A TSC packet can slip past MTC packets so that the
    timestamp appears to go backwards.

  - Fixes for exported-sql-viewer GUI conversion to python3.

ARM coresight:

  Solomon Tan:

  - Fix the build by adding a missing case value for enumeration value introduced
    in newer library, that now is the required one.

tool headers:

  Arnaldo Carvalho de Melo:

  - Syncronize kernel headers with the kernel, getting new io_uring and
    pidfd_send_signal syscalls so that 'perf trace' can handle them.

Signed-off-by: Arnaldo Carvalho de Melo <>

perf pmu: Fix parser error for uncore event alias

Perf fails to parse uncore event alias, for example:

  # perf stat -e unc_m_clockticks -a --no-merge sleep 1
  event syntax error: 'unc_m_clockticks'
                       \___ parser error

Current code assumes that the event alias is from one specific PMU.

To find the PMU, perf strcmps the PMU name of event alias with the real
PMU name on the system.

However, the uncore event alias may be from multiple PMUs with common
prefix. The PMU name of uncore event alias is the common prefix.

For example, UNC_M_CLOCKTICKS is clock event for iMC, which include 6
PMUs with the same prefix "uncore_imc" on a skylake server.

The real PMU names on the system for iMC are uncore_imc_0 ...

The strncmp is used to only check the common prefix for uncore event

With the patch:

  # perf stat -e unc_m_clockticks -a --no-merge sleep 1
  Performance counter stats for 'system wide':

       723,594,722      unc_m_clockticks [uncore_imc_5]
       724,001,954      unc_m_clockticks [uncore_imc_3]
       724,042,655      unc_m_clockticks [uncore_imc_1]
       724,161,001      unc_m_clockticks [uncore_imc_4]
       724,293,713      unc_m_clockticks [uncore_imc_2]
       724,340,901      unc_m_clockticks [uncore_imc_0]

       1.002090060 seconds time elapsed

Signed-off-by: Kan Liang <>
Acked-by: Jiri Olsa <>
Cc: Andi Kleen <>
Cc: Thomas Richter <>
Fixes: ea1fa48c055f ("perf stat: Handle different PMU names with common prefix")
Signed-off-by: Arnaldo Carvalho de Melo <>
1 file changed