Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2014 23:40:30 -0500
From:      Pedro Giffuni <pfg@freebsd.org>
To:        Peter Grehan <grehan@freebsd.org>
Cc:        "freebsd-dtrace@freebsd.org" <freebsd-dtrace@freebsd.org>
Subject:   Re: Importing the latest dis_tables.c
Message-ID:  <86D6EFA1-6636-462C-891F-CCEDC252B86F@freebsd.org>
In-Reply-To: <CAMw1wOx_VnBS8-dJGT6ZBXWZ9nk7p8sf0gQUbvz4Eps5HLN8=A@mail.gmail.com>
References:  <5369A19B.9080505@freebsd.org> <CAMw1wOx_VnBS8-dJGT6ZBXWZ9nk7p8sf0gQUbvz4Eps5HLN8=A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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

> On Tue, May 6, 2014 at 10:59 PM, Peter Grehan <grehan@freebsd.org> =
wrote:
>> Hi,
>>=20
>> 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.
>>=20
>>=20
>> =
http://src.illumos.org/source/history/illumos-gate/usr/src/common/dis/i386=
/dis_tables.c
>>=20
>> 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 ?
>=20
> 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.
>=20
> 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.
>=20

Hmm =85 we have indeed been sloppy when merging DTrace stuff into the =
tree: I can=92t 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/di=
s_tables.c?r1=3D/illumos-gate/usr/src/common/dis/i386/dis_tables.c@7aa76ff=
c594f84c1c092911a84f85a79ddb44c73&r2=3D/illumos-gate/usr/src/common/dis/i3=
86/dis_tables.c@70dc7639cedb77623859b80d3b9e9b266e89c15f&format=3Du&full=3D=
0

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

Pedro.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86D6EFA1-6636-462C-891F-CCEDC252B86F>