1. 31 7月, 2016 4 次提交
  2. 18 7月, 2016 1 次提交
  3. 16 7月, 2016 1 次提交
    • D
      perf, events: add non-linear data support for raw records · 7e3f977e
      Daniel Borkmann 提交于
      This patch adds support for non-linear data on raw records. It
      extends raw records to have one or multiple fragments that will
      be written linearly into the ring slot, where each fragment can
      optionally have a custom callback handler to walk and extract
      complex, possibly non-linear data.
      
      If a callback handler is provided for a fragment, then the new
      __output_custom() will be used instead of __output_copy() for
      the perf_output_sample() part. perf_prepare_sample() does all
      the size calculation only once, so perf_output_sample() doesn't
      need to redo the same work anymore, meaning real_size and padding
      will be cached in the raw record. The raw record becomes 32 bytes
      in size without holes; to not increase it further and to avoid
      doing unnecessary recalculations in fast-path, we can reuse
      next pointer of the last fragment, idea here is borrowed from
      ZERO_OR_NULL_PTR(), which should keep the perf_output_sample()
      path for PERF_SAMPLE_RAW minimal.
      
      This facility is needed for BPF's event output helper as a first
      user that will, in a follow-up, add an additional perf_raw_frag
      to its perf_raw_record in order to be able to more efficiently
      dump skb context after a linear head meta data related to it.
      skbs can be non-linear and thus need a custom output function to
      dump buffers. Currently, the skb data needs to be copied twice;
      with the help of __output_custom() this work only needs to be
      done once. Future users could be things like XDP/BPF programs
      that work on different context though and would thus also have
      a different callback function.
      
      The few users of raw records are adapted to initialize their frag
      data from the raw record itself, no change in behavior for them.
      The code is based upon a PoC diff provided by Peter Zijlstra [1].
      
        [1] http://thread.gmane.org/gmane.linux.network/421294Suggested-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e3f977e
  4. 14 7月, 2016 2 次提交
  5. 13 7月, 2016 1 次提交
  6. 04 7月, 2016 2 次提交
    • H
      s390: have unique symbol for __switch_to address · 46210c44
      Heiko Carstens 提交于
      After linking there are several symbols for the same address that the
      __switch_to symbol points to. E.g.:
      
      000000000089b9c0 T __kprobes_text_start
      000000000089b9c0 T __lock_text_end
      000000000089b9c0 T __lock_text_start
      000000000089b9c0 T __sched_text_end
      000000000089b9c0 T __switch_to
      
      When disassembling with "objdump -d" this results in a missing
      __switch_to function. It would be named __kprobes_text_start
      instead. To unconfuse objdump add a nop in front of the kprobes text
      section. That way __switch_to appears again.
      
      Obviously this solution is sort of a hack, since it also depends on
      link order if this works or not. However it is the best I can come up
      with for now.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      46210c44
    • H
      s390/cpuinfo: show maximum thread id · 10f4954a
      Heiko Carstens 提交于
      Expose the maximum thread id with /proc/cpuinfo.
      With the new line the output looks like this:
      
      vendor_id       : IBM/S390
      bogomips per cpu: 20325.00
      max thread id   : 1
      
      With this new interface it is possible to always tell the correct
      number of cpu threads potentially being used by the kernel.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      10f4954a
  7. 28 6月, 2016 8 次提交
  8. 23 6月, 2016 1 次提交
  9. 16 6月, 2016 1 次提交
    • H
      s390/cpum_cf: use perf software context for hardware counters · 9254e70c
      Hendrik Brueckner 提交于
      On s390, there are two different hardware PMUs for counting and
      sampling.  Previously, both PMUs have shared the perf_hw_context
      which is not correct and, recently, results in this warning:
      
          ------------[ cut here ]------------
          WARNING: CPU: 5 PID: 1 at kernel/events/core.c:8485 perf_pmu_register+0x420/0x428
          Modules linked in:
          CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.7.0-rc1+ #2
          task: 00000009c5240000 ti: 00000009c5234000 task.ti: 00000009c5234000
          Krnl PSW : 0704c00180000000 0000000000220c50 (perf_pmu_register+0x420/0x428)
                     R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
          Krnl GPRS: ffffffffffffffff 0000000000b15ac6 0000000000000000 00000009cb440000
                     000000000022087a 0000000000000000 0000000000b78fa0 0000000000000000
                     0000000000a9aa90 0000000000000084 0000000000000005 000000000088a97a
                     0000000000000004 0000000000749dd0 000000000022087a 00000009c5237cc0
          Krnl Code: 0000000000220c44: a7f4ff54            brc     15,220aec
                     0000000000220c48: 92011000           mvi     0(%r1),1
                    #0000000000220c4c: a7f40001           brc     15,220c4e
                    >0000000000220c50: a7f4ff12           brc     15,220a74
                     0000000000220c54: 0707               bcr     0,%r7
                     0000000000220c56: 0707               bcr     0,%r7
                     0000000000220c58: ebdff0800024       stmg    %r13,%r15,128(%r15)
                     0000000000220c5e: a7f13fe0           tmll    %r15,16352
          Call Trace:
          ([<000000000022087a>] perf_pmu_register+0x4a/0x428)
          ([<0000000000b2c25c>] init_cpum_sampling_pmu+0x14c/0x1f8)
          ([<0000000000100248>] do_one_initcall+0x48/0x140)
          ([<0000000000b25d26>] kernel_init_freeable+0x1e6/0x2a0)
          ([<000000000072bda4>] kernel_init+0x24/0x138)
          ([<000000000073495e>] kernel_thread_starter+0x6/0xc)
          ([<0000000000734958>] kernel_thread_starter+0x0/0xc)
          Last Breaking-Event-Address:
           [<0000000000220c4c>] perf_pmu_register+0x41c/0x428
          ---[ end trace 0c6ef9f5b771ad97 ]---
      
      Using the perf_sw_context is an option because the cpum_cf PMU does
      not use interrupts.  To make this more clear, initialize the
      capabilities in the PMU structure.
      Signed-off-by: NHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Suggested-by: NPeter Zijlstra <peterz@infradead.org>
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      9254e70c
  10. 15 6月, 2016 4 次提交
  11. 14 6月, 2016 1 次提交
  12. 13 6月, 2016 14 次提交