1. 10 6月, 2015 1 次提交
    • A
      powerpc/mm: Add trace point for tracking hash pte fault · cfcb3d80
      Aneesh Kumar K.V 提交于
      This enables us to understand how many hash fault we are taking
      when running benchmarks.
      
      For ex:
      -bash-4.2# ./perf stat -e  powerpc:hash_fault -e page-faults /tmp/ebizzy.ppc64 -S 30  -P -n 1000
      ...
      
       Performance counter stats for '/tmp/ebizzy.ppc64 -S 30 -P -n 1000':
      
             1,10,04,075      powerpc:hash_fault
             1,10,03,429      page-faults
      
            30.865978991 seconds time elapsed
      
      NOTE:
      The impact of the tracepoint was not noticeable when running test. It was
      within the run-time variance of the test. For ex:
      
      without-patch:
      --------------
      
       Performance counter stats for './a.out 3000 300':
      
      	       643      page-faults               #    0.089 M/sec
      	  7.236562      task-clock (msec)         #    0.928 CPUs utilized
      	 2,179,213      stalled-cycles-frontend   #    0.00% frontend cycles idle
      	17,174,367      stalled-cycles-backend    #    0.00% backend  cycles idle
      		 0      context-switches          #    0.000 K/sec
      
             0.007794658 seconds time elapsed
      
      And with-patch:
      ---------------
      
       Performance counter stats for './a.out 3000 300':
      
      	       643      page-faults               #    0.089 M/sec
      	  7.233746      task-clock (msec)         #    0.921 CPUs utilized
      		 0      context-switches          #    0.000 K/sec
      
             0.007854876 seconds time elapsed
      
       Performance counter stats for './a.out 3000 300':
      
      	       643      page-faults               #    0.087 M/sec
      	       649      powerpc:hash_fault        #    0.087 M/sec
      	  7.430376      task-clock (msec)         #    0.938 CPUs utilized
      	 2,347,174      stalled-cycles-frontend   #    0.00% frontend cycles idle
      	17,524,282      stalled-cycles-backend    #    0.00% backend  cycles idle
      		 0      context-switches          #    0.000 K/sec
      
             0.007920284 seconds time elapsed
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      cfcb3d80
  2. 11 7月, 2014 1 次提交
    • A
      powernv: Add OPAL tracepoints · c49f6353
      Anton Blanchard 提交于
      Knowing how long we spend in firmware calls is an important part of
      minimising OS jitter.
      
      This patch adds tracepoints to each OPAL call. If tracepoints are
      enabled we branch out to a common routine that calls an entry and exit
      tracepoint.
      
      This allows us to write tools that monitor the frequency and duration
      of OPAL calls, eg:
      
      name                  count  total(ms)  min(ms)  max(ms)  avg(ms)  period(ms)
      OPAL_HANDLE_INTERRUPT     5      0.199    0.037    0.042    0.040   12547.545
      OPAL_POLL_EVENTS        204      2.590    0.012    0.036    0.013    2264.899
      OPAL_PCI_MSI_EOI       2830      3.066    0.001    0.005    0.001      81.166
      
      We use jump labels if configured, which means we only add a single
      nop instruction to every OPAL call when the tracepoints are disabled.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c49f6353
  3. 03 7月, 2012 1 次提交
  4. 28 10月, 2009 4 次提交
    • A
      powerpc: tracing: Give hypervisor call tracepoints access to arguments · 6f26353c
      Anton Blanchard 提交于
      While most users of the hcall tracepoints will only want the opcode
      and return code, some will want all the arguments.  To avoid the
      complexity of using varargs we pass a pointer to the register save
      area, which contains all the arguments.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6f26353c
    • A
      powerpc: tracing: Add hypervisor call tracepoints · c8cd093a
      Anton Blanchard 提交于
      Add hcall_entry and hcall_exit tracepoints.  This replaces the inline
      assembly HCALL_STATS code and converts it to use the new tracepoints.
      
      To keep the disabled case as quick as possible, we embed a status word
      in the TOC so we can get at it with a single load.  By doing so we
      keep the overhead at a minimum.  Time taken for a null hcall:
      
      No tracepoint code:	135.79 cycles
      Disabled tracepoints:	137.95 cycles
      
      For reference, before this patch enabling HCALL_STATS resulted in a null
      hcall of 201.44 cycles!
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c8cd093a
    • A
      powerpc: tracing: Add powerpc tracepoints for timer entry and exit · 6795b85c
      Anton Blanchard 提交于
      We can monitor the effectiveness of our power management of both the
      kernel and hypervisor by probing the timer interrupt. For example, on
      this box we see 10.37s timer interrupts on an idle core:
      
      <idle>-0     [010]  3900.671297: timer_interrupt_entry: pt_regs=c0000000ce1e7b10
      <idle>-0     [010]  3900.671302: timer_interrupt_exit: pt_regs=c0000000ce1e7b10
      
      <idle>-0     [010]  3911.042963: timer_interrupt_entry: pt_regs=c0000000ce1e7b10
      <idle>-0     [010]  3911.042968: timer_interrupt_exit: pt_regs=c0000000ce1e7b10
      
      <idle>-0     [010]  3921.414630: timer_interrupt_entry: pt_regs=c0000000ce1e7b10
      <idle>-0     [010]  3921.414635: timer_interrupt_exit: pt_regs=c0000000ce1e7b10
      
      Since we have a 207MHz decrementer it will go negative and fire every 10.37s
      even if Linux is completely idle.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6795b85c
    • A
      powerpc: tracing: Add powerpc tracepoints for interrupt entry and exit · 1bf4af16
      Anton Blanchard 提交于
      This adds powerpc-specific tracepoints for interrupt entry and exit.
      
      While we already have generic irq_handler_entry and irq_handler_exit
      tracepoints there are cases on our virtualised powerpc machines where an
      interrupt is presented to the OS, but subsequently handled by the hypervisor.
      This means no OS interrupt handler is invoked.
      
      Here is an example on a POWER6 machine with the patch below applied:
      
      <idle>-0     [006]  3243.949840744: irq_entry: pt_regs=c0000000ce31fb10
      <idle>-0     [006]  3243.949850520: irq_exit: pt_regs=c0000000ce31fb10
      
      <idle>-0     [007]  3243.950218208: irq_entry: pt_regs=c0000000ce323b10
      <idle>-0     [007]  3243.950224080: irq_exit: pt_regs=c0000000ce323b10
      
      <idle>-0     [000]  3244.021879320: irq_entry: pt_regs=c000000000a63aa0
      <idle>-0     [000]  3244.021883616: irq_handler_entry: irq=87 handler=eth0
      <idle>-0     [000]  3244.021887328: irq_handler_exit: irq=87 return=handled
      <idle>-0     [000]  3244.021897408: irq_exit: pt_regs=c000000000a63aa0
      
      Here we see two phantom interrupts (no handler was invoked), followed
      by a real interrupt for eth0. Without the tracepoints in this patch we
      would have missed the phantom interrupts.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1bf4af16