Re: Add MKCTF

2014-03-30 Thread Ryota Ozaki
On Wed, Mar 26, 2014 at 11:31 AM, Thor Lancelot Simon t...@panix.com wrote:
 On Mon, Mar 24, 2014 at 07:27:33PM +0900, Ryota Ozaki wrote:
 Hi,

 I'm adding a new build variable MKCTF, which
 was discussed on the chat some days ago.

 Currently CTF tools are built and used to generate
 and manipulate CTF data of ELF binaries when
 we build with MKDTRACE=yes. Unfortunately,
 current CTF tools don't work on i386/amd64/arm,
 and that adds a burden to try DTrace by users.

 The new variable is intended to separate CTF
 stuffs from MKDTRACE; we can build DTrace
 solely without worrying about the CTF issues.
 Fortunately, CTF data are not used yet by
 current DTrace of NetBSD, so DTrace still
 works without CTF data.

 The CTF data for the kernel are needed in order to use
 DTrace on the kernel, no?

DTrace works anyway w/o CTF data. Nonetheless, it lacks
some detailed information. We will of course support CTF
data at some point.

  ozaki-r


 Thor


Re: Add MKCTF

2014-03-25 Thread Thor Lancelot Simon
On Mon, Mar 24, 2014 at 07:27:33PM +0900, Ryota Ozaki wrote:
 Hi,
 
 I'm adding a new build variable MKCTF, which
 was discussed on the chat some days ago.
 
 Currently CTF tools are built and used to generate
 and manipulate CTF data of ELF binaries when
 we build with MKDTRACE=yes. Unfortunately,
 current CTF tools don't work on i386/amd64/arm,
 and that adds a burden to try DTrace by users.
 
 The new variable is intended to separate CTF
 stuffs from MKDTRACE; we can build DTrace
 solely without worrying about the CTF issues.
 Fortunately, CTF data are not used yet by
 current DTrace of NetBSD, so DTrace still
 works without CTF data.

The CTF data for the kernel are needed in order to use
DTrace on the kernel, no?

Thor


Add MKCTF

2014-03-24 Thread Ryota Ozaki
Hi,

I'm adding a new build variable MKCTF, which
was discussed on the chat some days ago.

Currently CTF tools are built and used to generate
and manipulate CTF data of ELF binaries when
we build with MKDTRACE=yes. Unfortunately,
current CTF tools don't work on i386/amd64/arm,
and that adds a burden to try DTrace by users.

The new variable is intended to separate CTF
stuffs from MKDTRACE; we can build DTrace
solely without worrying about the CTF issues.
Fortunately, CTF data are not used yet by
current DTrace of NetBSD, so DTrace still
works without CTF data.

Once CTF issues are solved, we would be
able to merge MKCTF to MKDTRACE again
but it would not come soon. So I think the
workaround is still useful at this point.

My patch is attached and also available at
http://www.netbsd.org/~ozaki-r/MKCTF.diff .

This is the diffstat of the patch:
$ diffstat MKCTF.diff
 distrib/sets/lists/comp/mi   |6 +++---
 distrib/sets/lists/man/mi|   18 +-
 etc/Makefile.params  |2 +-
 external/cddl/Makefile   |2 +-
 external/cddl/osnet/lib/Makefile |2 ++
 external/cddl/osnet/usr.bin/Makefile |2 +-
 share/man/man5/mk.conf.5 |7 +++
 share/mk/bsd.README  |5 +
 share/mk/bsd.own.mk  |4 ++--
 share/mk/bsd.prog.mk |2 +-
 tools/Makefile   |2 ++
 11 files changed, 34 insertions(+), 18 deletions(-)

Any comments and suggestions are welcome.

Best regards,
  ozaki-r
Index: distrib/sets/lists/comp/mi
===
RCS file: /cvs/cvsroot/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.1885
diff -u -r1.1885 mi
--- distrib/sets/lists/comp/mi  22 Mar 2014 11:24:35 -  1.1885
+++ distrib/sets/lists/comp/mi  24 Mar 2014 09:43:41 -
@@ -20,9 +20,9 @@
 ./usr/bin/config   comp-util-bin
 ./usr/bin/crunchgencomp-c-bin
 ./usr/bin/crunchidecomp-c-bin
-./usr/bin/ctfconvert   comp-util-bin   dtrace
-./usr/bin/ctfdump  comp-util-bin   dtrace
-./usr/bin/ctfmerge comp-util-bin   dtrace
+./usr/bin/ctfconvert   comp-util-bin   ctf
+./usr/bin/ctfdump  comp-util-bin   ctf
+./usr/bin/ctfmerge comp-util-bin   ctf
 ./usr/bin/cvs  comp-cvs-bincvs
 ./usr/bin/cvsbug   comp-cvs-bincvs
 ./usr/bin/elfedit  comp-util-bin   binutils
Index: distrib/sets/lists/man/mi
===
RCS file: /cvs/cvsroot/src/distrib/sets/lists/man/mi,v
retrieving revision 1.1465
diff -u -r1.1465 mi
--- distrib/sets/lists/man/mi   19 Mar 2014 15:26:41 -  1.1465
+++ distrib/sets/lists/man/mi   24 Mar 2014 09:43:43 -
@@ -125,9 +125,9 @@
 ./usr/share/man/cat1/csh.0 man-util-catman .cat
 ./usr/share/man/cat1/csplit.0  man-util-catman .cat
 ./usr/share/man/cat1/ctags.0   man-c-catman.cat
-./usr/share/man/cat1/ctfconvert.0  man-util-catman 
.cat,dtrace
-./usr/share/man/cat1/ctfdump.0 man-util-catman 
.cat,dtrace
-./usr/share/man/cat1/ctfmerge.0man-util-catman 
.cat,dtrace
+./usr/share/man/cat1/ctfconvert.0  man-util-catman .cat,ctf
+./usr/share/man/cat1/ctfdump.0 man-util-catman .cat,ctf
+./usr/share/man/cat1/ctfmerge.0man-util-catman 
.cat,ctf
 ./usr/share/man/cat1/cu.0  man-util-catman .cat
 ./usr/share/man/cat1/cut.0 man-util-catman .cat
 ./usr/share/man/cat1/daicctl.0 man-sysutil-catman  .cat
@@ -3240,9 +3240,9 @@
 ./usr/share/man/html1/csh.html man-util-htmlmanhtml
 ./usr/share/man/html1/csplit.html  man-util-htmlmanhtml
 ./usr/share/man/html1/ctags.html   man-c-htmlman   html
-./usr/share/man/html1/ctfconvert.html  man-util-htmlman
html,dtrace
-./usr/share/man/html1/ctfdump.html man-util-htmlman
html,dtrace
-./usr/share/man/html1/ctfmerge.htmlman-util-htmlman
html,dtrace
+./usr/share/man/html1/ctfconvert.html  man-util-htmlmanhtml,ctf
+./usr/share/man/html1/ctfdump.html man-util-htmlmanhtml,ctf
+./usr/share/man/html1/ctfmerge.htmlman-util-htmlmanhtml,ctf
 ./usr/share/man/html1/cu.html  man-util-htmlmanhtml
 ./usr/share/man/html1/cut.html 

Re: Add MKCTF

2014-03-24 Thread Ryota Ozaki
On Tue, Mar 25, 2014 at 1:47 AM, Christos Zoulas chris...@astron.com wrote:
 In article 
 cakryomjraa3-olqh7wmmqh1tprjzb1oq9a6vrskiin+ltf-...@mail.gmail.com,
 Ryota Ozaki  ozak...@netbsd.org wrote:
-=-=-=-=-=-

Hi,

I'm adding a new build variable MKCTF, which
was discussed on the chat some days ago.

Currently CTF tools are built and used to generate
and manipulate CTF data of ELF binaries when
we build with MKDTRACE=yes. Unfortunately,
current CTF tools don't work on i386/amd64/arm,
and that adds a burden to try DTrace by users.

The new variable is intended to separate CTF
stuffs from MKDTRACE; we can build DTrace
solely without worrying about the CTF issues.
Fortunately, CTF data are not used yet by
current DTrace of NetBSD, so DTrace still
works without CTF data.

Once CTF issues are solved, we would be
able to merge MKCTF to MKDTRACE again
but it would not come soon. So I think the
workaround is still useful at this point.

My patch is attached and also available at
http://www.netbsd.org/~ozaki-r/MKCTF.diff .

 I am happy with that approach.

Thanks! I will commit it later.

  ozaki-r