Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Dec 2010 23:38:32 -0800
From:      Artem Belevich <fbsdlist@src.cx>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: syscall provider naming convention. Re: kern/152822: [patch] DTrace: syscall provider for compat/freebsd32
Message-ID:  <AANLkTi=ehLNs8aeYfGUattetm7oMj8HhEB1Vnep9uAZk@mail.gmail.com>
In-Reply-To: <20101211215341.0000097c@unknown>
References:  <AANLkTi=z1_KWKmhqFjNYHZfgAyPgsUVvgJ0P29KOPpnZ@mail.gmail.com> <20101211215341.0000097c@unknown>

next in thread | previous in thread | raw e-mail | index | archive | help
> Maybe a little bit related: do you know about my (unfortunately
> out-of-date) branch to add dtrace providers to the linuxulator?
> http://svn.freebsd.org/viewvc/base/user/netchild/linuxulator-dtrace/
>
> If you are interested feel free to borrow things from there.

I'll take a look.

>> I'm leaning towards using 'module' but I would appreciate hackers@
>> opinion on the best way to proceed.
>
> My first thought was that this is a good idea.
>
> My second thought was the question if you can make the provided values
> there compatible enough that a dtrace script is able to cope with it
> when someone does not uses a specific module but the wirldcard
> operator. If not I suggest to think again about it.

Installing wildcard probes should work fine either way. If we use
module to differentiate between emulation variants then
syscall::write:entry will install probes for all variants of write
syscall. In cases when we use wildcard syscall probes that would
typically be the right thing to do. For instance, in case of one-liner
like 'syscall:::entry { @num[pid,execname] = count(); }'. That's in
fact why I started tinkering with this -- the one-liner above didn't
show anything for 32-bit binaries I've been running. On the other
hand, most of the current scripts that use syscall provider do not
specify module. Such scripts would now match more than one syscall.
I.e. if the intent was to catch only native write syscall, the probe
would now be installed for freeebsd32 and linux32 variants as well.
Given the fact that most of available Dtrace scripts that come from
Solaris need modifications/tweaking anyways, that's probably not such
a big deal.

If we use different provider names, then one could do syscall*::write:
and that would work, too. This reverses situation above. Current
wildcard probes will remain limited to native syscalls and would need
to be changed. If someone would want to include syscalls from other
emulation layers they would have to explicitly install probes for
corresponding providers.

Functionally both approaches are about the same functionally. Each has
pluses and minuses. Using module, though, looks somewhat cleaner.

--Artem



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=ehLNs8aeYfGUattetm7oMj8HhEB1Vnep9uAZk>