1. 16 Sep, 2015 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · a4d71093
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
      - Enhance the error reporting of tracepoint event parsing, e.g.:
      
          $ oldperf record -e sched:sched_switc usleep 1
          event syntax error: 'sched:sched_switc'
                               \___ unknown tracepoint
          Run 'perf list' for a list of valid events
      
        Now we get the much nicer:
      
          $ perf record -e sched:sched_switc ls
          event syntax error: 'sched:sched_switc'
                               \___ can't access trace events
      
          Error: No permissions to read /sys/kernel/debug/tracing/events/sched/sched_switc
          Hint:  Try 'sudo mount -o remount,mode=755 /sys/kernel/debug'
      
        And after we have those mount point permissions fixed:
      
          $ perf record -e sched:sched_switc ls
          event syntax error: 'sched:sched_switc'
                               \___ unknown tracepoint
      
          Error: File /sys/kernel/debug/tracing/events/sched/sched_switc not found.
          Hint:  Perhaps this kernel misses some CONFIG_ setting to enable this feature?.
      
        Now its just a matter of using what git uses to suggest alternatives when we
        make a typo, i.e. that it is just an 'h' missing :-)
      
        I.e. basically now the event parsing routing uses the strerror_open()
        routines introduced by and used in 'perf trace' work. (Jiri Olsa)
      
      Infrastructure changes:
      
      - Export init/exit_probe_symbol_maps() from 'perf probe' for use in eBPF.
        (Namhyung Kim)
      
      - Free perf_probe_event in cleanup_perf_probe_events(). (Namhyung Kim)
      
      - regs_query_register_offset() infrastructure + implementation for x86.
        First user will be the perf/eBPF code. (Wang Nan)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a4d71093
  2. 15 Sep, 2015 9 commits
  3. 14 Sep, 2015 27 commits
  4. 13 Sep, 2015 3 commits
    • Sukadev Bhattiprolu's avatar
      perf/core: Drop PERF_EVENT_TXN · 8f3e5684
      Sukadev Bhattiprolu authored
      We currently use PERF_EVENT_TXN flag to determine if we are in the middle
      of a transaction. If in a transaction, we defer the schedulability checks
      from pmu->add() operation to the pmu->commit() operation.
      
      Now that we have "transaction types" (PERF_PMU_TXN_ADD, PERF_PMU_TXN_READ)
      we can use the type to determine if we are in a transaction and drop the
      PERF_EVENT_TXN flag.
      
      When PERF_EVENT_TXN is dropped, the cpuhw->group_flag on some architectures
      becomes unused, so drop that field as well.
      
      This is an extension of the Powerpc patch from Peter Zijlstra to s390,
      Sparc and x86 architectures.
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/1441336073-22750-11-git-send-email-sukadev@linux.vnet.ibm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8f3e5684
    • Sukadev Bhattiprolu's avatar
      powerpc, perf/powerpc/hv-24x7: Use PMU_TXN_READ interface · 88a48613
      Sukadev Bhattiprolu authored
      The 24x7 counters in Powerpc allow monitoring a large number of counters
      simultaneously. They also allow reading several counters in a single
      HCALL so we can get a more consistent snapshot of the system.
      
      Use the PMU's transaction interface to monitor and read several event
      counters at once. The idea is that users can group several 24x7 events
      into a single group of events. We use the following logic to submit
      the group of events to the PMU and read the values:
      
      	pmu->start_txn()		// Initialize before first event
      
      	for each event in group
      		pmu->read(event);	// Queue each event to be read
      
      	pmu->commit_txn()		// Read/update all queuedcounters
      
      The ->commit_txn() also updates the event counts in the respective
      perf_event objects.  The perf subsystem can then directly get the
      event counts from the perf_event and can avoid submitting a new
      ->read() request to the PMU.
      
      Thanks to input from Peter Zijlstra.
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/1441336073-22750-10-git-send-email-sukadev@linux.vnet.ibm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      88a48613
    • Sukadev Bhattiprolu's avatar
      perf/core: Define PERF_PMU_TXN_READ interface · 4a00c16e
      Sukadev Bhattiprolu authored
      Define a new PERF_PMU_TXN_READ interface to read a group of counters
      at once.
      
              pmu->start_txn()                // Initialize before first event
      
              for each event in group
                      pmu->read(event);       // Queue each event to be read
      
              rc = pmu->commit_txn()          // Read/update all queued counters
      
      Note that we use this interface with all PMUs.  PMUs that implement this
      interface use the ->read() operation to _queue_ the counters to be read
      and use ->commit_txn() to actually read all the queued counters at once.
      
      PMUs that don't implement PERF_PMU_TXN_READ ignore ->start_txn() and
      ->commit_txn() and continue to read counters one at a time.
      
      Thanks to input from Peter Zijlstra.
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/1441336073-22750-9-git-send-email-sukadev@linux.vnet.ibm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4a00c16e