]> git.baikalelectronics.ru Git - kernel.git/commit
powernv: Add OPAL tracepoints
authorAnton Blanchard <anton@samba.org>
Thu, 3 Jul 2014 07:20:50 +0000 (17:20 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 11 Jul 2014 06:06:08 +0000 (16:06 +1000)
commitf1742f50589c8dd78e42e76fd57fb62caa5e23e6
treea8460e7df288521de11e8fc55dd6300c733fa653
parentb1292e5400d100d2f7e4c5cd11a109c4916ffe7a
powernv: Add OPAL tracepoints

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: Anton Blanchard <anton@samba.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/trace.h
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/opal-tracepoints.c [new file with mode: 0644]
arch/powerpc/platforms/powernv/opal-wrappers.S