]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: augment SDT probes with type information
authorNick Alcock <nick.alcock@oracle.com>
Wed, 14 Sep 2016 09:39:33 +0000 (10:39 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 28 Oct 2016 12:45:45 +0000 (13:45 +0100)
commitba0174a4b14de9c5d14214b2cab72d4d8d44174a
treef44e5cc8c1de2783014fb602326c98c1b12226cf
parentec8c03da4f00339c460381fe2851e21d9ef85260
dtrace: augment SDT probes with type information

With all the other work done, we can finally move the SDT probe
type information out of the static sdt_args array in the SDT kernel
module and put them in the probe definitions they relate to.

Most of it is already there -- all probes already carry type
information.  All that is missing is translations, so we add those.

The syntax for these is

type: translation
  or
type : (translation, ...)

i.e. a source type, followed by a colon, followed by zero or more
translated types (if there is more than one, they must be bracketed),
with optional spaces if you like.  The resulting probe will have as many
arguments as there are translations.  Obviously, if DTrace userspace is
to do anything with this knowledge it will need a translator from the
specified source type to each of the specified translated types: DTrace
picks these up from kernel-versioned subdirectories of
/usr/lib64/dtrace/ (e.g. /usr/lib64/dtrace/4.1).

If a probe appears more than once (say, in different functions), each
instance must presently have the same types.  Changing translations
between instances of a single probe will be diagnosed if CONFIG_DT_DEBUG
is enabled.

Typos in the types are only diagnosed at runtime: a dtrace -vln of your
new probe will tell you if all is well.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
Orabug: 24661801
fs/buffer.c
kernel/fork.c
kernel/sched/core.c
kernel/signal.c
kernel/time/timer.c