Re: svn commit: r247962 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2013-04-01 Thread Dimitry Andric
On Apr 1, 2013, at 08:07, Andriy Gapon a...@freebsd.org wrote:
 on 08/03/2013 00:43 Dimitry Andric said the following:
 Author: dim
 Date: Thu Mar  7 22:43:50 2013
 New Revision: 247962
 URL: http://svnweb.freebsd.org/changeset/base/247962
 
 Log:
  Fix error in r247960: actually assign the basename to match.iim_file.
 
 I've got some bad news.
 
 First of all, sorry for not being thorough enough when this change was
 originally proposed.  I rebuilt only ctfconvert with the patch, but ctfmerge 
 was
 left alone.
 
 It seems that r247960 + r247962 (this commit) broke ctfmerge in my environment
 (head + clang).  While .o files have expected ctf information, combined files
 miss ctf data for functions.
Do you have a good test case?  I tried building a few kernel modules,
but I do see ctf data for functions, at least in ctfdump output.

Also, a simple test case with a pair of .o files, each containing a
function, seems to work properly when processed with ctfmerge.

 I haven't dug yet into this problem, but I suspect that there is some mismatch
 at another place (or even multiple places) where STT_FILE is used.

The only other place is cddl/contrib/opensolaris/tools/ctf/cvt/input.c,
so I more or less blindly made the attached diff, which might solve the
problem.  Can you please try it in your environment?



ctf-input-stt_file-1.diff
Description: Binary data
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org

Re: svn commit: r247962 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2013-04-01 Thread Jim Harris
On Mon, Apr 1, 2013 at 11:04 AM, Dimitry Andric d...@freebsd.org wrote:

 On Apr 1, 2013, at 08:07, Andriy Gapon a...@freebsd.org wrote:
  on 08/03/2013 00:43 Dimitry Andric said the following:
  Author: dim
  Date: Thu Mar  7 22:43:50 2013
  New Revision: 247962
  URL: http://svnweb.freebsd.org/changeset/base/247962
 
  Log:
   Fix error in r247960: actually assign the basename to match.iim_file.
 
  I've got some bad news.
 
  First of all, sorry for not being thorough enough when this change was
  originally proposed.  I rebuilt only ctfconvert with the patch, but
 ctfmerge was
  left alone.
 
  It seems that r247960 + r247962 (this commit) broke ctfmerge in my
 environment
  (head + clang).  While .o files have expected ctf information, combined
 files
  miss ctf data for functions.
 Do you have a good test case?  I tried building a few kernel modules,
 but I do see ctf data for functions, at least in ctfdump output.

 Also, a simple test case with a pair of .o files, each containing a
 function, seems to work properly when processed with ctfmerge.

  I haven't dug yet into this problem, but I suspect that there is some
 mismatch
  at another place (or even multiple places) where STT_FILE is used.

 The only other place is cddl/contrib/opensolaris/tools/ctf/cvt/input.c,
 so I more or less blindly made the attached diff, which might solve the
 problem.  Can you please try it in your environment?


I'm not sure if this is the same problem seen by avg@, but without your
patch, I was getting lots of the following when doing dtrace -lv:

fbt_getargdesc(1309): Unknown function!

Your patch fixes this issue for me.

Thanks,

-Jim
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r247962 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2013-04-01 Thread Andriy Gapon
on 01/04/2013 23:38 Jim Harris said the following:
 
 
 
 On Mon, Apr 1, 2013 at 11:04 AM, Dimitry Andric d...@freebsd.org
 mailto:d...@freebsd.org wrote:
 
 On Apr 1, 2013, at 08:07, Andriy Gapon a...@freebsd.org
 mailto:a...@freebsd.org wrote:
  on 08/03/2013 00:43 Dimitry Andric said the following:
  Author: dim
  Date: Thu Mar  7 22:43:50 2013
  New Revision: 247962
  URL: http://svnweb.freebsd.org/changeset/base/247962
 
  Log:
   Fix error in r247960: actually assign the basename to match.iim_file.
 
  I've got some bad news.
 
  First of all, sorry for not being thorough enough when this change was
  originally proposed.  I rebuilt only ctfconvert with the patch, but
 ctfmerge was
  left alone.
 
  It seems that r247960 + r247962 (this commit) broke ctfmerge in my 
 environment
  (head + clang).  While .o files have expected ctf information, combined 
 files
  miss ctf data for functions.
 Do you have a good test case?  I tried building a few kernel modules,
 but I do see ctf data for functions, at least in ctfdump output.
 
 Also, a simple test case with a pair of .o files, each containing a
 function, seems to work properly when processed with ctfmerge.

Were any of the functions that you looked at static?
For me there were tons of the test cases.  To pick at random metaslab_activate
was found in metaslab.o, but not in zfs.ko.

  I haven't dug yet into this problem, but I suspect that there is some 
 mismatch
  at another place (or even multiple places) where STT_FILE is used.
 
 The only other place is cddl/contrib/opensolaris/tools/ctf/cvt/input.c,
 so I more or less blindly made the attached diff, which might solve the
 problem.  Can you please try it in your environment?

This patch does help.  Thank you!

 I'm not sure if this is the same problem seen by avg@, but without your 
 patch, I
 was getting lots of the following when doing dtrace -lv:
 
 fbt_getargdesc(1309): Unknown function!

This is a consequence of the ctfmerge problem.

 Your patch fixes this issue for me.


-- 
Andriy Gapon
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r247962 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2013-03-07 Thread Dimitry Andric
Author: dim
Date: Thu Mar  7 22:43:50 2013
New Revision: 247962
URL: http://svnweb.freebsd.org/changeset/base/247962

Log:
  Fix error in r247960: actually assign the basename to match.iim_file.
  
  Pointed out by:   avg
  Pointy hat to:dim
  MFC after:1 week
  X-MFC-With:   r247960

Modified:
  head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/output.cThu Mar  7 
22:32:41 2013(r247961)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/output.cThu Mar  7 
22:43:50 2013(r247962)
@@ -379,8 +379,7 @@ sort_iidescs(Elf *elf, const char *file,
switch (GELF_ST_TYPE(sym.st_info)) {
case STT_FILE:
bname = strrchr(match.iim_name, '/');
-   bname = bname == NULL ? match.iim_name : bname + 1;
-   match.iim_file = match.iim_name;
+   match.iim_file = bname == NULL ? match.iim_name : bname 
+ 1;
continue;
case STT_OBJECT:
tolist = iiburst-iib_objts;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org