1. Jun 17, 2021
    • Yang Jihong's avatar
      perf annotate: Add itrace options support · 4bcbe438
      Yang Jihong authored
      
      
      The "auxtrace_info" and "auxtrace" functions are not set in "tool" member of
      "annotate". As a result, perf annotate does not support parsing itrace data.
      
      Before:
      
        # perf record -e arm_spe_0/branch_filter=1/ -a sleep 1
        [ perf record: Woken up 9 times to write data ]
        [ perf record: Captured and wrote 20.874 MB perf.data ]
        # perf annotate --stdio
        Error:
        The perf.data data has no samples!
      
      Solution:
      
      1. Add itrace options in help,
      2. Set hook functions of "id_index", "auxtrace_info" and "auxtrace" in perf_tool.
      
      After:
      
        # perf record --all-user -e arm_spe_0/branch_filter=1/ ls
        Couldn't synthesize bpf events.
        perf.data
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.010 MB perf.data ]
        # perf annotate --stdio
         Percent |      Source code & Disassembly of libc-2.28.so for branch-miss (1 samples, percent: local period)
        ------------------------------------------------------------------------------------------------------------
                 :
                 :
                 :
                 :           Disassembly of section .text:
                 :
                 :           0000000000066180 <__getdelim@@GLIBC_2.17>:
            0.00 :   66180:  stp     x29, x30, [sp, #-96]!
            0.00 :   66184:  cmp     x0, #0x0
            0.00 :   66188:  ccmp    x1, #0x0, #0x4, ne  // ne = any
            0.00 :   6618c:  mov     x29, sp
            0.00 :   66190:  stp     x24, x25, [sp, #56]
            0.00 :   66194:  stp     x26, x27, [sp, #72]
            0.00 :   66198:  str     x28, [sp, #88]
            0.00 :   6619c:  b.eq    66450 <__getdelim@@GLIBC_2.17+0x2d0>  // b.none
            0.00 :   661a0:  stp     x22, x23, [x29, #40]
            0.00 :   661a4:  mov     x22, x1
            0.00 :   661a8:  ldr     w1, [x3]
            0.00 :   661ac:  mov     w23, w2
            0.00 :   661b0:  stp     x20, x21, [x29, #24]
            0.00 :   661b4:  mov     x20, x3
            0.00 :   661b8:  mov     x21, x0
            0.00 :   661bc:  tbnz    w1, #15, 66360 <__getdelim@@GLIBC_2.17+0x1e0>
            0.00 :   661c0:  ldr     x0, [x3, #136]
            0.00 :   661c4:  ldr     x2, [x0, #8]
            0.00 :   661c8:  str     x19, [x29, #16]
            0.00 :   661cc:  mrs     x19, tpidr_el0
            0.00 :   661d0:  sub     x19, x19, #0x700
            0.00 :   661d4:  cmp     x2, x19
            0.00 :   661d8:  b.eq    663f0 <__getdelim@@GLIBC_2.17+0x270>  // b.none
            0.00 :   661dc:  mov     w1, #0x1                        // #1
            0.00 :   661e0:  ldaxr   w2, [x0]
            0.00 :   661e4:  cmp     w2, #0x0
            0.00 :   661e8:  b.ne    661f4 <__getdelim@@GLIBC_2.17+0x74>  // b.any
            0.00 :   661ec:  stxr    w3, w1, [x0]
            0.00 :   661f0:  cbnz    w3, 661e0 <__getdelim@@GLIBC_2.17+0x60>
            0.00 :   661f4:  b.ne    66448 <__getdelim@@GLIBC_2.17+0x2c8>  // b.any
            0.00 :   661f8:  ldr     x0, [x20, #136]
            0.00 :   661fc:  ldr     w1, [x20]
            0.00 :   66200:  ldr     w2, [x0, #4]
            0.00 :   66204:  str     x19, [x0, #8]
            0.00 :   66208:  add     w2, w2, #0x1
            0.00 :   6620c:  str     w2, [x0, #4]
            0.00 :   66210:  tbnz    w1, #5, 66388 <__getdelim@@GLIBC_2.17+0x208>
            0.00 :   66214:  ldr     x19, [x29, #16]
            0.00 :   66218:  ldr     x0, [x21]
            0.00 :   6621c:  cbz     x0, 66228 <__getdelim@@GLIBC_2.17+0xa8>
            0.00 :   66220:  ldr     x0, [x22]
            0.00 :   66224:  cbnz    x0, 6623c <__getdelim@@GLIBC_2.17+0xbc>
            0.00 :   66228:  mov     x0, #0x78                       // #120
            0.00 :   6622c:  str     x0, [x22]
            0.00 :   66230:  bl      20710 <malloc@plt>
            0.00 :   66234:  str     x0, [x21]
            0.00 :   66238:  cbz     x0, 66428 <__getdelim@@GLIBC_2.17+0x2a8>
            0.00 :   6623c:  ldr     x27, [x20, #8]
            0.00 :   66240:  str     x19, [x29, #16]
            0.00 :   66244:  ldr     x19, [x20, #16]
            0.00 :   66248:  sub     x19, x19, x27
            0.00 :   6624c:  cmp     x19, #0x0
            0.00 :   66250:  b.le    66398 <__getdelim@@GLIBC_2.17+0x218>
            0.00 :   66254:  mov     x25, #0x0                       // #0
            0.00 :   66258:  b       662d8 <__getdelim@@GLIBC_2.17+0x158>
            0.00 :   6625c:  nop
            0.00 :   66260:  add     x24, x19, x25
            0.00 :   66264:  ldr     x3, [x22]
            0.00 :   66268:  add     x26, x24, #0x1
            0.00 :   6626c:  ldr     x0, [x21]
            0.00 :   66270:  cmp     x3, x26
            0.00 :   66274:  b.cs    6629c <__getdelim@@GLIBC_2.17+0x11c>  // b.hs, b.nlast
            0.00 :   66278:  lsl     x3, x3, #1
            0.00 :   6627c:  cmp     x3, x26
            0.00 :   66280:  csel    x26, x3, x26, cs  // cs = hs, nlast
            0.00 :   66284:  mov     x1, x26
            0.00 :   66288:  bl      206f0 <realloc@plt>
            0.00 :   6628c:  cbz     x0, 66438 <__getdelim@@GLIBC_2.17+0x2b8>
            0.00 :   66290:  str     x0, [x21]
            0.00 :   66294:  ldr     x27, [x20, #8]
            0.00 :   66298:  str     x26, [x22]
            0.00 :   6629c:  mov     x2, x19
            0.00 :   662a0:  mov     x1, x27
            0.00 :   662a4:  add     x0, x0, x25
            0.00 :   662a8:  bl      87390 <explicit_bzero@@GLIBC_2.25+0x50>
            0.00 :   662ac:  ldr     x0, [x20, #8]
            0.00 :   662b0:  add     x19, x0, x19
            0.00 :   662b4:  str     x19, [x20, #8]
            0.00 :   662b8:  cbnz    x28, 66410 <__getdelim@@GLIBC_2.17+0x290>
            0.00 :   662bc:  mov     x0, x20
            0.00 :   662c0:  bl      73b80 <__underflow@@GLIBC_2.17>
            0.00 :   662c4:  cmn     w0, #0x1
            0.00 :   662c8:  b.eq    66410 <__getdelim@@GLIBC_2.17+0x290>  // b.none
            0.00 :   662cc:  ldp     x27, x19, [x20, #8]
            0.00 :   662d0:  mov     x25, x24
            0.00 :   662d4:  sub     x19, x19, x27
            0.00 :   662d8:  mov     x2, x19
            0.00 :   662dc:  mov     w1, w23
            0.00 :   662e0:  mov     x0, x27
            0.00 :   662e4:  bl      807b0 <memchr@@GLIBC_2.17>
            0.00 :   662e8:  cmp     x0, #0x0
            0.00 :   662ec:  mov     x28, x0
            0.00 :   662f0:  sub     x0, x0, x27
            0.00 :   662f4:  csinc   x19, x19, x0, eq  // eq = none
            0.00 :   662f8:  mov     x0, #0x7fffffffffffffff         // #9223372036854775807
            0.00 :   662fc:  sub     x0, x0, x25
            0.00 :   66300:  cmp     x19, x0
            0.00 :   66304:  b.lt    66260 <__getdelim@@GLIBC_2.17+0xe0>  // b.tstop
            0.00 :   66308:  adrp    x0, 17f000 <sys_sigabbrev@@GLIBC_2.17+0x320>
            0.00 :   6630c:  ldr     x0, [x0, #3624]
            0.00 :   66310:  mrs     x2, tpidr_el0
            0.00 :   66314:  ldr     x19, [x29, #16]
            0.00 :   66318:  mov     w3, #0x4b                       // #75
            0.00 :   6631c:  ldr     w1, [x20]
            0.00 :   66320:  mov     x24, #0xffffffffffffffff        // #-1
            0.00 :   66324:  str     w3, [x2, x0]
            0.00 :   66328:  tbnz    w1, #15, 66340 <__getdelim@@GLIBC_2.17+0x1c0>
            0.00 :   6632c:  ldr     x0, [x20, #136]
            0.00 :   66330:  ldr     w1, [x0, #4]
            0.00 :   66334:  sub     w1, w1, #0x1
            0.00 :   66338:  str     w1, [x0, #4]
            0.00 :   6633c:  cbz     w1, 663b8 <__getdelim@@GLIBC_2.17+0x238>
            0.00 :   66340:  mov     x0, x24
            0.00 :   66344:  ldr     x28, [sp, #88]
            0.00 :   66348:  ldp     x20, x21, [x29, #24]
            0.00 :   6634c:  ldp     x22, x23, [x29, #40]
            0.00 :   66350:  ldp     x24, x25, [sp, #56]
            0.00 :   66354:  ldp     x26, x27, [sp, #72]
            0.00 :   66358:  ldp     x29, x30, [sp], #96
            0.00 :   6635c:  ret
          100.00 :   66360:  tbz     w1, #5, 66218 <__getdelim@@GLIBC_2.17+0x98>
            0.00 :   66364:  ldp     x20, x21, [x29, #24]
            0.00 :   66368:  mov     x24, #0xffffffffffffffff        // #-1
            0.00 :   6636c:  ldp     x22, x23, [x29, #40]
            0.00 :   66370:  mov     x0, x24
            0.00 :   66374:  ldp     x24, x25, [sp, #56]
            0.00 :   66378:  ldp     x26, x27, [sp, #72]
            0.00 :   6637c:  ldr     x28, [sp, #88]
            0.00 :   66380:  ldp     x29, x30, [sp], #96
            0.00 :   66384:  ret
            0.00 :   66388:  mov     x24, #0xffffffffffffffff        // #-1
            0.00 :   6638c:  ldr     x19, [x29, #16]
            0.00 :   66390:  b       66328 <__getdelim@@GLIBC_2.17+0x1a8>
            0.00 :   66394:  nop
            0.00 :   66398:  mov     x0, x20
            0.00 :   6639c:  bl      73b80 <__underflow@@GLIBC_2.17>
            0.00 :   663a0:  cmn     w0, #0x1
            0.00 :   663a4:  b.eq    66438 <__getdelim@@GLIBC_2.17+0x2b8>  // b.none
            0.00 :   663a8:  ldp     x27, x19, [x20, #8]
            0.00 :   663ac:  sub     x19, x19, x27
            0.00 :   663b0:  b       66254 <__getdelim@@GLIBC_2.17+0xd4>
            0.00 :   663b4:  nop
            0.00 :   663b8:  str     xzr, [x0, #8]
            0.00 :   663bc:  ldxr    w2, [x0]
            0.00 :   663c0:  stlxr   w3, w1, [x0]
            0.00 :   663c4:  cbnz    w3, 663bc <__getdelim@@GLIBC_2.17+0x23c>
            0.00 :   663c8:  cmp     w2, #0x1
            0.00 :   663cc:  b.le    66340 <__getdelim@@GLIBC_2.17+0x1c0>
            0.00 :   663d0:  mov     x1, #0x81                       // #129
            0.00 :   663d4:  mov     x2, #0x1                        // #1
            0.00 :   663d8:  mov     x3, #0x0                        // #0
            0.00 :   663dc:  mov     x8, #0x62                       // #98
            0.00 :   663e0:  svc     #0x0
            0.00 :   663e4:  ldp     x20, x21, [x29, #24]
            0.00 :   663e8:  ldp     x22, x23, [x29, #40]
            0.00 :   663ec:  b       66370 <__getdelim@@GLIBC_2.17+0x1f0>
            0.00 :   663f0:  ldr     w2, [x0, #4]
            0.00 :   663f4:  add     w2, w2, #0x1
            0.00 :   663f8:  str     w2, [x0, #4]
            0.00 :   663fc:  tbz     w1, #5, 66214 <__getdelim@@GLIBC_2.17+0x94>
            0.00 :   66400:  mov     x24, #0xffffffffffffffff        // #-1
            0.00 :   66404:  ldr     x19, [x29, #16]
            0.00 :   66408:  b       66330 <__getdelim@@GLIBC_2.17+0x1b0>
            0.00 :   6640c:  nop
            0.00 :   66410:  ldr     x0, [x21]
            0.00 :   66414:  strb    wzr, [x0, x24]
            0.00 :   66418:  ldr     w1, [x20]
            0.00 :   6641c:  ldr     x19, [x29, #16]
            0.00 :   66420:  b       66328 <__getdelim@@GLIBC_2.17+0x1a8>
            0.00 :   66424:  nop
            0.00 :   66428:  mov     x24, #0xffffffffffffffff        // #-1
            0.00 :   6642c:  ldr     w1, [x20]
            0.00 :   66430:  b       66328 <__getdelim@@GLIBC_2.17+0x1a8>
            0.00 :   66434:  nop
            0.00 :   66438:  mov     x24, #0xffffffffffffffff        // #-1
            0.00 :   6643c:  ldr     w1, [x20]
            0.00 :   66440:  ldr     x19, [x29, #16]
            0.00 :   66444:  b       66328 <__getdelim@@GLIBC_2.17+0x1a8>
            0.00 :   66448:  bl      e3ba0 <pthread_setcanceltype@@GLIBC_2.17+0x30>
            0.00 :   6644c:  b       661f8 <__getdelim@@GLIBC_2.17+0x78>
            0.00 :   66450:  adrp    x0, 17f000 <sys_sigabbrev@@GLIBC_2.17+0x320>
            0.00 :   66454:  ldr     x0, [x0, #3624]
            0.00 :   66458:  mrs     x1, tpidr_el0
            0.00 :   6645c:  mov     w2, #0x16                       // #22
            0.00 :   66460:  mov     x24, #0xffffffffffffffff        // #-1
            0.00 :   66464:  str     w2, [x1, x0]
            0.00 :   66468:  b       66370 <__getdelim@@GLIBC_2.17+0x1f0>
            0.00 :   6646c:  ldr     w1, [x20]
            0.00 :   66470:  mov     x4, x0
            0.00 :   66474:  tbnz    w1, #15, 6648c <__getdelim@@GLIBC_2.17+0x30c>
            0.00 :   66478:  ldr     x0, [x20, #136]
            0.00 :   6647c:  ldr     w1, [x0, #4]
            0.00 :   66480:  sub     w1, w1, #0x1
            0.00 :   66484:  str     w1, [x0, #4]
            0.00 :   66488:  cbz     w1, 66494 <__getdelim@@GLIBC_2.17+0x314>
            0.00 :   6648c:  mov     x0, x4
            0.00 :   66490:  bl      20e40 <gnu_get_libc_version@@GLIBC_2.17+0x130>
            0.00 :   66494:  str     xzr, [x0, #8]
            0.00 :   66498:  ldxr    w2, [x0]
            0.00 :   6649c:  stlxr   w3, w1, [x0]
            0.00 :   664a0:  cbnz    w3, 66498 <__getdelim@@GLIBC_2.17+0x318>
            0.00 :   664a4:  cmp     w2, #0x1
            0.00 :   664a8:  b.le    6648c <__getdelim@@GLIBC_2.17+0x30c>
            0.00 :   664ac:  mov     x1, #0x81                       // #129
            0.00 :   664b0:  mov     x2, #0x1                        // #1
            0.00 :   664b4:  mov     x3, #0x0                        // #0
            0.00 :   664b8:  mov     x8, #0x62                       // #98
            0.00 :   664bc:  svc     #0x0
            0.00 :   664c0:  b       6648c <__getdelim@@GLIBC_2.17+0x30c>
      
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Tested-by: default avatarLeo Yan <leo.yan@linaro.org>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210615091704.259202-1-yangjihong1@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4bcbe438
    • Li Huafei's avatar
      perf mem-events: Remove duplicate #undef · 28b8e87a
      Li Huafei authored
      
      
      Remove duplicate '#undef E'.
      
      Signed-off-by: default avatarLi Huafei <lihuafei1@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Zhang Jinhao <zhangjinhao2@huawei.com>
      Link: http://lore.kernel.org/lkml/20210616120339.219807-1-lihuafei1@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      28b8e87a
  2. Jun 11, 2021
    • Jin Yao's avatar
      perf evsel: Adjust hybrid event and global event mixed group · 1fcc57b7
      Jin Yao authored
      
      
      A group mixed with hybrid event and global event is allowed. For
      example, group leader is 'intel_pt//' and the group member is
      'cpu_atom/cycles/'.
      
      e.g.:
      
        # perf record --aux-sample -e '{intel_pt//,cpu_atom/cycles/}:u'
      
      The challenge is that their available cpus are not fully matched. For
      example, 'intel_pt//' is available on CPU0-CPU23, but 'cpu_atom/cycles/'
      is available on CPU16-CPU23.
      
      When getting the group id for group member, we must be very careful.
      Because the cpu for 'intel_pt//' is not equal to the cpu for
      'cpu_atom/cycles/'. Actually the cpu here is the index of evsel->core.cpus,
      not the real CPU ID.
      
      e.g. cpu0 for 'intel_pt//' is CPU0, but cpu0 for 'cpu_atom/cycles/' is CPU16.
      
      Before:
      
        # perf record --aux-sample -e '{intel_pt//,cpu_atom/cycles/}:u' -vv uname
        ...
        ------------------------------------------------------------
        perf_event_attr:
          type                             10
          size                             128
          config                           0xe601
          { sample_period, sample_freq }   1
          sample_type                      IP|TID|TIME|CPU|IDENTIFIER
          read_format                      ID
          disabled                         1
          inherit                          1
          exclude_kernel                   1
          exclude_hv                       1
          enable_on_exec                   1
          sample_id_all                    1
          exclude_guest                    1
        ------------------------------------------------------------
        sys_perf_event_open: pid 4084  cpu 0  group_fd -1  flags 0x8 = 5
        sys_perf_event_open: pid 4084  cpu 1  group_fd -1  flags 0x8 = 6
        sys_perf_event_open: pid 4084  cpu 2  group_fd -1  flags 0x8 = 7
        sys_perf_event_open: pid 4084  cpu 3  group_fd -1  flags 0x8 = 9
        sys_perf_event_open: pid 4084  cpu 4  group_fd -1  flags 0x8 = 10
        sys_perf_event_open: pid 4084  cpu 5  group_fd -1  flags 0x8 = 11
        sys_perf_event_open: pid 4084  cpu 6  group_fd -1  flags 0x8 = 12
        sys_perf_event_open: pid 4084  cpu 7  group_fd -1  flags 0x8 = 13
        sys_perf_event_open: pid 4084  cpu 8  group_fd -1  flags 0x8 = 14
        sys_perf_event_open: pid 4084  cpu 9  group_fd -1  flags 0x8 = 15
        sys_perf_event_open: pid 4084  cpu 10  group_fd -1  flags 0x8 = 16
        sys_perf_event_open: pid 4084  cpu 11  group_fd -1  flags 0x8 = 17
        sys_perf_event_open: pid 4084  cpu 12  group_fd -1  flags 0x8 = 18
        sys_perf_event_open: pid 4084  cpu 13  group_fd -1  flags 0x8 = 19
        sys_perf_event_open: pid 4084  cpu 14  group_fd -1  flags 0x8 = 20
        sys_perf_event_open: pid 4084  cpu 15  group_fd -1  flags 0x8 = 21
        sys_perf_event_open: pid 4084  cpu 16  group_fd -1  flags 0x8 = 22
        sys_perf_event_open: pid 4084  cpu 17  group_fd -1  flags 0x8 = 23
        sys_perf_event_open: pid 4084  cpu 18  group_fd -1  flags 0x8 = 24
        sys_perf_event_open: pid 4084  cpu 19  group_fd -1  flags 0x8 = 25
        sys_perf_event_open: pid 4084  cpu 20  group_fd -1  flags 0x8 = 26
        sys_perf_event_open: pid 4084  cpu 21  group_fd -1  flags 0x8 = 27
        sys_perf_event_open: pid 4084  cpu 22  group_fd -1  flags 0x8 = 28
        sys_perf_event_open: pid 4084  cpu 23  group_fd -1  flags 0x8 = 29
        ------------------------------------------------------------
        perf_event_attr:
          size                             128
          config                           0x800000000
          { sample_period, sample_freq }   4000
          sample_type                      IP|TID|TIME|PERIOD|IDENTIFIER|AUX
          read_format                      ID
          inherit                          1
          exclude_kernel                   1
          exclude_hv                       1
          freq                             1
          sample_id_all                    1
          exclude_guest                    1
          aux_sample_size                  4096
        ------------------------------------------------------------
        sys_perf_event_open: pid 4084  cpu 16  group_fd 5  flags 0x8
        sys_perf_event_open failed, error -22
      
      The group_fd 5 is not correct. It should be 22 (the fd of
      'intel_pt' on CPU16).
      
      After:
      
        # perf record --aux-sample -e '{intel_pt//,cpu_atom/cycles/}:u' -vv uname
        ...
        ------------------------------------------------------------
        perf_event_attr:
          type                             10
          size                             128
          config                           0xe601
          { sample_period, sample_freq }   1
          sample_type                      IP|TID|TIME|CPU|IDENTIFIER
          read_format                      ID
          disabled                         1
          inherit                          1
          exclude_kernel                   1
          exclude_hv                       1
          enable_on_exec                   1
          sample_id_all                    1
          exclude_guest                    1
        ------------------------------------------------------------
        sys_perf_event_open: pid 5162  cpu 0  group_fd -1  flags 0x8 = 5
        sys_perf_event_open: pid 5162  cpu 1  group_fd -1  flags 0x8 = 6
        sys_perf_event_open: pid 5162  cpu 2  group_fd -1  flags 0x8 = 7
        sys_perf_event_open: pid 5162  cpu 3  group_fd -1  flags 0x8 = 9
        sys_perf_event_open: pid 5162  cpu 4  group_fd -1  flags 0x8 = 10
        sys_perf_event_open: pid 5162  cpu 5  group_fd -1  flags 0x8 = 11
        sys_perf_event_open: pid 5162  cpu 6  group_fd -1  flags 0x8 = 12
        sys_perf_event_open: pid 5162  cpu 7  group_fd -1  flags 0x8 = 13
        sys_perf_event_open: pid 5162  cpu 8  group_fd -1  flags 0x8 = 14
        sys_perf_event_open: pid 5162  cpu 9  group_fd -1  flags 0x8 = 15
        sys_perf_event_open: pid 5162  cpu 10  group_fd -1  flags 0x8 = 16
        sys_perf_event_open: pid 5162  cpu 11  group_fd -1  flags 0x8 = 17
        sys_perf_event_open: pid 5162  cpu 12  group_fd -1  flags 0x8 = 18
        sys_perf_event_open: pid 5162  cpu 13  group_fd -1  flags 0x8 = 19
        sys_perf_event_open: pid 5162  cpu 14  group_fd -1  flags 0x8 = 20
        sys_perf_event_open: pid 5162  cpu 15  group_fd -1  flags 0x8 = 21
        sys_perf_event_open: pid 5162  cpu 16  group_fd -1  flags 0x8 = 22
        sys_perf_event_open: pid 5162  cpu 17  group_fd -1  flags 0x8 = 23
        sys_perf_event_open: pid 5162  cpu 18  group_fd -1  flags 0x8 = 24
        sys_perf_event_open: pid 5162  cpu 19  group_fd -1  flags 0x8 = 25
        sys_perf_event_open: pid 5162  cpu 20  group_fd -1  flags 0x8 = 26
        sys_perf_event_open: pid 5162  cpu 21  group_fd -1  flags 0x8 = 27
        sys_perf_event_open: pid 5162  cpu 22  group_fd -1  flags 0x8 = 28
        sys_perf_event_open: pid 5162  cpu 23  group_fd -1  flags 0x8 = 29
        ------------------------------------------------------------
        perf_event_attr:
          size                             128
          config                           0x800000000
          { sample_period, sample_freq }   4000
          sample_type                      IP|TID|TIME|PERIOD|IDENTIFIER|AUX
          read_format                      ID
          inherit                          1
          exclude_kernel                   1
          exclude_hv                       1
          freq                             1
          sample_id_all                    1
          exclude_guest                    1
          aux_sample_size                  4096
        ------------------------------------------------------------
        sys_perf_event_open: pid 5162  cpu 16  group_fd 22  flags 0x8 = 30
        sys_perf_event_open: pid 5162  cpu 17  group_fd 23  flags 0x8 = 31
        sys_perf_event_open: pid 5162  cpu 18  group_fd 24  flags 0x8 = 32
        sys_perf_event_open: pid 5162  cpu 19  group_fd 25  flags 0x8 = 33
        sys_perf_event_open: pid 5162  cpu 20  group_fd 26  flags 0x8 = 34
        sys_perf_event_open: pid 5162  cpu 21  group_fd 27  flags 0x8 = 35
        sys_perf_event_open: pid 5162  cpu 22  group_fd 28  flags 0x8 = 36
        sys_perf_event_open: pid 5162  cpu 23  group_fd 29  flags 0x8 = 37
        ------------------------------------------------------------
        ...
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210609044555.27180-1-yao.jin@linux.intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1fcc57b7
  3. Jun 09, 2021
  4. Jun 08, 2021
  5. Jun 05, 2021
  6. Jun 04, 2021
  7. Jun 02, 2021
  8. Jun 01, 2021
  9. May 31, 2021
  10. May 30, 2021
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · b90e90f4
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "This is a bit larger than usual at rc4 time. The reason is due to
        Lee's work of fixing newly reported build warnings.
      
        The rest is fixes as usual"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (22 commits)
        MAINTAINERS: adjust to removing i2c designware platform data
        i2c: s3c2410: fix possible NULL pointer deref on read message after write
        i2c: mediatek: Disable i2c start_en and clear intr_stat brfore reset
        i2c: i801: Don't generate an interrupt on bus reset
        i2c: mpc: implement erratum A-004447 workaround
        powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P1010 i2c controllers
        powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P2041 i2c controllers
        dt-bindings: i2c: mpc: Add fsl,i2c-erratum-a004447 flag
        i2c: busses: i2c-stm32f4: Remove incorrectly placed ' ' from function name
        i2c: busses: i2c-st: Fix copy/paste function misnaming issues
        i2c: busses: i2c-pnx: Provide descriptions for 'alg_data' data structure
        i2c: busses: i2c-ocores: Place the expected function names into the documentation headers
        i2c: busses: i2c-eg20t: Fix 'bad line' issue and provide description for 'msgs' param
        i2c: busses: i2c-designware-master: Fix misnaming of 'i2c_dw_init_master()'
        i2c: busses: i2c-cadence: Fix incorrectly documented 'enum cdns_i2c_slave_mode'
        i2c: busses: i2c-ali1563: File headers are not good candidates for kernel-doc
        i2c: muxes: i2c-arb-gpio-challenge: Demote non-conformant kernel-doc headers
        i2c: busses: i2c-nomadik: Fix formatting issue pertaining to 'timeout'
        i2c: sh_mobile: Use new clock calculation formulas for RZ/G2E
        i2c: I2C_HISI should depend on ACPI
        ...
      b90e90f4
    • Linus Torvalds's avatar
      Merge tag 'seccomp-fixes-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 9a76c0ee
      Linus Torvalds authored
      Pull seccomp fixes from Kees Cook:
       "This fixes a hard-to-hit race condition in the addfd user_notif
        feature of seccomp, visible since v5.9.
      
        And a small documentation fix"
      
      * tag 'seccomp-fixes-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        seccomp: Refactor notification handler to prepare for new semantics
        Documentation: seccomp: Fix user notification documentation
      9a76c0ee
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 9d68fe84
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
       "A handful of RISC-V related fixes:
      
         - avoid errors when the stack tracing code is tracing itself.
      
         - resurrect the memtest= kernel command line argument on RISC-V,
           which was briefly enabled during the merge window before a
           refactoring disabled it.
      
         - build fix and some warning cleanups"
      
      * tag 'riscv-for-linus-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: kexec: Fix W=1 build warnings
        riscv: kprobes: Fix build error when MMU=n
        riscv: Select ARCH_USE_MEMTEST
        riscv: stacktrace: fix the riscv stacktrace when CONFIG_FRAME_POINTER enabled
      9d68fe84
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.13-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 75b9c727
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
       "This week's pile mitigates some decades-old problems in how extent
        size hints interact with realtime volumes, fixes some failures in
        online shrink, and fixes a problem where directory and symlink
        shrinking on extremely fragmented filesystems could fail.
      
        The most user-notable change here is to point users at our (new) IRC
        channel on OFTC. Freedom isn't free, it costs folks like you and me;
        and if you don't kowtow, they'll expel everyone and take over your
        channel. (Ok, ok, that didn't fit the song lyrics...)
      
        Summary:
      
         - Fix a bug where unmapping operations end earlier than expected,
           which can cause chaos on multi-block directory and symlink shrink
           operations.
      
         - Fix an erroneous assert that can trigger if we try to transition a
           bmap structure from btree format to extents format with zero
           extents. This was exposed by xfs/538"
      
      * tag 'xfs-5.13-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: bunmapi has unnecessary AG lock ordering issues
        xfs: btree format inode forks can have zero extents
        xfs: add new IRC channel to MAINTAINERS
        xfs: validate extsz hints against rt extent size when rtinherit is set
        xfs: standardize extent size hint validation
        xfs: check free AG space when making per-AG reservations
      75b9c727
    • Sargun Dhillon's avatar
      seccomp: Refactor notification handler to prepare for new semantics · ddc47391
      Sargun Dhillon authored
      This refactors the user notification code to have a do / while loop around
      the completion condition. This has a small change in semantic, in that
      previously we ignored addfd calls upon wakeup if the notification had been
      responded to, but instead with the new change we check for an outstanding
      addfd calls prior to returning to userspace.
      
      Rodrigo Campos also identified a bug that can result in addfd causing
      an early return, when the supervisor didn't actually handle the
      syscall [1].
      
      [1]: https://lore.kernel.org/lkml/20210413160151.3301-1-rodrigo@kinvolk.io/
      
      Fixes: 7cf97b12
      
       ("seccomp: Introduce addfd ioctl to seccomp user notifier")
      Signed-off-by: default avatarSargun Dhillon <sargun@sargun.me>
      Acked-by: default avatarTycho Andersen <tycho@tycho.pizza>
      Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Tested-by: default avatarRodrigo Campos <rodrigo@kinvolk.io>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20210517193908.3113-3-sargun@sargun.me
      ddc47391