Importing the latest dis_tables.c

Pedro Giffuni pfg at freebsd.org
Wed May 7 04:47:24 UTC 2014


Il giorno 06/mag/2014, alle ore 23:00, Mark Johnston <markj at freebsd.org> ha scritto:

> On Tue, May 6, 2014 at 10:59 PM, Peter Grehan <grehan at freebsd.org> wrote:
>> Hi,
>> 
>> I'd like to pull in the latest version of dis_tables.c from illumos-gate to
>> pick up the recent work done there. This is mainly for using dtrace on the
>> bhyve kernel module since it can decode VT-x/SVM instructions, but is
>> probably generally useful.
>> 
>> 
>> http://src.illumos.org/source/history/illumos-gate/usr/src/common/dis/i386/dis_tables.c
>> 
>> What's the process for this ? Should I pull this into vendor/illumos-sys,
>> or just drop it directly into FreeBSD (which is what the previous commits
>> seemed to do) ? Any tips ?
> 
> FWIW, vendor-sys/illumos is merged to sys/cddl/opensolaris, but in
> FreeBSD, dis_tables.c lives at sys/cddl/dev/dtrace/x86/dis_tables.c
> for some reason. That is, it's not under the merge target, so merging
> from vendor-sys/illumos might not be possible without first moving
> dis_tables.{c,h} to sys/cddl/opensolaris/common/dis.
> 
> I think that's at least part of the reason dis_tables.c has been
> updated directly in the past, so I don't think it would be problematic
> to keep doing it that way until dis_tables.{c,h} are moved (assuming
> that that's sufficient to start merging them from vendor-sys). I'm not
> 100% sure of this though.
> 

Hmm … we have indeed been sloppy when merging DTrace stuff into the tree: I can’t seem to find that file in the vendor-sys area. It looks like that file was just added, instead of copied from the vendor area.

Looking at our history (before the file was moved) and comparing to the illumos history:
http://src.illumos.org/source/history/illumos-gate/usr/src/common/dis/i386/dis_tables.c

It appears the last merge to that file that we brought is the AVX support from Aug 2010 (this was still OpenSolaris):
ab47273fedff893c8ae22ec39ffc666d4fa6fc8b (I so much hate git for using checksums instead of revisions!)

So you would have to bring at least 3 more illumos revisions up to the one in Sept 2011. One of them brings their Dtrace support for KVM which is interesting but you may not want it at this time.

Perhaps these are the changes you need:

http://src.illumos.org/source/diff/illumos-gate/usr/src/common/dis/i386/dis_tables.c?r1=/illumos-gate/usr/src/common/dis/i386/dis_tables.c@7aa76ffc594f84c1c092911a84f85a79ddb44c73&r2=/illumos-gate/usr/src/common/dis/i386/dis_tables.c@70dc7639cedb77623859b80d3b9e9b266e89c15f&format=u&full=0

Although not elegant, just bringing the patch would seem easier that going through the vendor branch :(

Pedro.


More information about the freebsd-dtrace mailing list