Dwarves Archive on lore.kernel.org
 help / color / Atom feed
* Re: pahole regression: -a no longer works?
@ 2009-06-27 15:36 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-06-27 15:36 UTC (permalink / raw)
  To: Samuel Bronson; +Cc: dwarves-u79uwXL29TY76Z2rM5mHXA

Em Thu, Jun 25, 2009 at 09:29:28PM -0400, Samuel Bronson escreveu:
> I've just noticed that pahole's -a flag does not seem to result in
> typedef'd structs being printed anymore.
> 
> For example, with Debian's dwarves 1.3-1, on a self-compiled libVEX
> from valgrind, I see loads of typedef'd struct types like this one:
> 
> typedef struct {
>         IRTypeEnv *                type_env;             /*     0     4 */
>         HReg *                     vregmap;              /*     4     4 */
>         Int                        n_vregmap;            /*     8     4 */
>         HInstrArray *              code;                 /*    12     4 */
>         Int                        vreg_ctr;             /*    16     4 */
> 
>         /* size: 20, cachelines: 1 */
>         /* last cacheline: 20 bytes */
> } ISelEnv;      /* definitions: 1 */
> 
> but in the latest, I get only the following three:

<SNIP>

Yeah, that is a regression, I'll fix it, till then just use "pdwtags",
it will print all the tags, including the structs that have no name.
 
> This should be pretty easy to reproduce, but if not I could provide
> you with an .o file... I'd bisect it myself if it weren't for the fact
> that libebl.a is no longer available on Debian squeeze/sid, which
> means I can't build without patching the cmake :-(

What about my suggestion to change the proposed patch to check if it is
running on a debian system and if so to avoid checking for libebl?

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pahole regression: -a no longer works?
       [not found]       ` <87eit5lm0u.wl%naesten-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2009-06-27 15:50         ` Arnaldo Carvalho de Melo
@ 2009-06-27 16:34         ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-06-27 16:34 UTC (permalink / raw)
  To: Samuel Bronson; +Cc: dwarves

Em Sat, Jun 27, 2009 at 11:44:01AM -0400, Samuel Bronson escreveu:
> Speaking of the REDHAT/FEDORA conditional,
> 
>   (a) why doesn't it have a comment explaining what it's for? -- that
> is, what is different on redhat/fedora, and what it does to compensate
> for them
> 
>   (b) why is it *after* the check for the "dwfl_module_build_id"
> symbol, so that the REDHAT/FEDORA stuff can't fix up the missing
> variables and allow the symbol check a chance to run?

Just added comments for both cases, please take a look and see if it
makes it clear for you:

commit f96099b4c519e83ab2421c2e7660e132f63ddec7
Author: Arnaldo Carvalho de Melo <acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date:   Sat Jun 27 13:32:20 2009 -0300

    cmake: Add comments explaining build_id and fedora/rh detection
    
    Suggested-by: Samuel Bronson <naesten-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
    Signed-off-by: Arnaldo Carvalho de Melo <acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

diff --git a/cmake/modules/FindDWARF.cmake b/cmake/modules/FindDWARF.cmake
index 76cdb3f..f4feec4 100644
--- a/cmake/modules/FindDWARF.cmake
+++ b/cmake/modules/FindDWARF.cmake
@@ -47,6 +47,10 @@ if (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY AN
 	set(DWARF_LIBRARIES ${DWARF_LIBRARY} ${ELF_LIBRARY} ${EBL_LIBRARY})
 
 	set(CMAKE_REQUIRED_LIBRARIES ${DWARF_LIBRARIES})
+	# check if libdw have the dwfl_module_build_id routine, i.e. if it supports the buildid
+	# mechanism to match binaries to detached debug info sections (the -debuginfo packages
+	# in distributions such as fedora). We do it against libelf because, IIRC, some distros
+	# include libdw linked statically into libelf.
 	check_library_exists(elf dwfl_module_build_id "" HAVE_DWFL_MODULE_BUILD_ID)
 else (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY AND EBL_LIBRARY)
 	set(DWARF_FOUND FALSE)
@@ -63,6 +67,9 @@ if (DWARF_FOUND)
 	endif (NOT DWARF_FIND_QUIETLY)
 else (DWARF_FOUND)
 	if (DWARF_FIND_REQUIRED)
+		# Check if we are in a Red Hat (RHEL) or Fedora system to tell
+		# exactly which packages should be installed. Please send
+		# patches for other distributions.
 		find_path(FEDORA fedora-release /etc)
 		find_path(REDHAT redhat-release /etc)
 		if (FEDORA OR REDHAT)
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pahole regression: -a no longer works?
       [not found]       ` <87eit5lm0u.wl%naesten-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2009-06-27 15:50         ` Arnaldo Carvalho de Melo
  2009-06-27 16:34         ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-06-27 15:50 UTC (permalink / raw)
  To: Samuel Bronson; +Cc: dwarves

Em Sat, Jun 27, 2009 at 11:44:01AM -0400, Samuel Bronson escreveu:
> Oops, I sent this to just Arnaldo the first time... sorry, Arnaldo!
> 
> On Sat, Jun 27, 2009 at 10:44 AM, Arnaldo Carvalho de
> Melo<acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org> wrote:
> 
> > What about my suggestion to change the proposed patch to check if it is
> > running on a debian system and if so to avoid checking for libebl?
> 
> Well, that wouldn't really help me with the bisection, though now that

I see, you would have to apply the patch at each bisection point and
remove it before going forward...

But anyway, you don't need to bisect it now, I've fixed it already :)
Please do a git pull and check if everything is ok now.

> I think about it I could have done that on one of the machines in my
> school's CS lab, where I had to build the elfutils libraries myself
> anyway...
 
> Anyway, about that idea: Debian hasn't always lacked libebl -- rolling
> it into libdw is a fairly recent thing, and back when it existed, both
>  libdw and libebl were provided as static libraries, so on systems
> that still have it, it will probably be necessary to link it in. Not
> to mention that having to conditionalize this on the distribution
> feels kind of icky, especially considering how hard-to-follow the
> REDHAT/FEDORA conditional already is.
> 
> Speaking of the REDHAT/FEDORA conditional,
> 
>   (a) why doesn't it have a comment explaining what it's for? -- that
> is, what is different on redhat/fedora, and what it does to compensate
> for them

I'll add the comment now
 
>   (b) why is it *after* the check for the "dwfl_module_build_id"
> symbol, so that the REDHAT/FEDORA stuff can't fix up the missing
> variables and allow the symbol check a chance to run?

lemme check...

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pahole regression: -a no longer works?
       [not found]   ` <20090627144405.GE4981-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
@ 2009-06-27 15:44     ` Samuel Bronson
       [not found]       ` <87eit5lm0u.wl%naesten-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Bronson @ 2009-06-27 15:44 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: dwarves

Oops, I sent this to just Arnaldo the first time... sorry, Arnaldo!

On Sat, Jun 27, 2009 at 10:44 AM, Arnaldo Carvalho de
Melo<acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org> wrote:

> What about my suggestion to change the proposed patch to check if it is
> running on a debian system and if so to avoid checking for libebl?

Well, that wouldn't really help me with the bisection, though now that
I think about it I could have done that on one of the machines in my
school's CS lab, where I had to build the elfutils libraries myself
anyway...

Anyway, about that idea: Debian hasn't always lacked libebl -- rolling
it into libdw is a fairly recent thing, and back when it existed, both
 libdw and libebl were provided as static libraries, so on systems
that still have it, it will probably be necessary to link it in. Not
to mention that having to conditionalize this on the distribution
feels kind of icky, especially considering how hard-to-follow the
REDHAT/FEDORA conditional already is.

Speaking of the REDHAT/FEDORA conditional,

  (a) why doesn't it have a comment explaining what it's for? -- that
is, what is different on redhat/fedora, and what it does to compensate
for them

  (b) why is it *after* the check for the "dwfl_module_build_id"
symbol, so that the REDHAT/FEDORA stuff can't fix up the missing
variables and allow the symbol check a chance to run?
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* pahole regression: -a no longer works?
@ 2009-06-26  1:29 Samuel Bronson
       [not found] ` <20090627144405.GE4981@ghostprotocols.net>
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Bronson @ 2009-06-26  1:29 UTC (permalink / raw)
  To: dwarves-u79uwXL29TY76Z2rM5mHXA

I've just noticed that pahole's -a flag does not seem to result in
typedef'd structs being printed anymore.

For example, with Debian's dwarves 1.3-1, on a self-compiled libVEX
from valgrind, I see loads of typedef'd struct types like this one:

typedef struct {
        IRTypeEnv *                type_env;             /*     0     4 */
        HReg *                     vregmap;              /*     4     4 */
        Int                        n_vregmap;            /*     8     4 */
        HInstrArray *              code;                 /*    12     4 */
        Int                        vreg_ctr;             /*    16     4 */

        /* size: 20, cachelines: 1 */
        /* last cacheline: 20 bytes */
} ISelEnv;      /* definitions: 1 */

but in the latest, I get only the following three:

struct _IRConst {
        IRConstTag                 tag;                  /*     0     4 */
        union {
                Bool               U1;                   /*           1 */
                UChar              U8;                   /*           1 */
                UShort             U16;                  /*           2 */
                UInt               U32;                  /*           4 */
                ULong              U64;                  /*           8 */
                Double             F64;                  /*           8 */
                ULong              F64i;                 /*           8 */
                UShort             V128;                 /*           2 */
        } Ico;                                           /*     4     8 */

        /* size: 12, cachelines: 1, members: 2 */
        /* last cacheline: 12 bytes */
};
struct _IRExpr {
        IRExprTag                  tag;                  /*     0     4 */
        union {
                struct {
                        Int        binder;               /*     4     4 */
                } Binder;                                /*           4 */
                struct {
                        Int        offset;               /*     4     4 */
                        IRType     ty;                   /*     8     4 */
                } Get;                                   /*           8 */
                struct {
                        IRRegArray * descr;              /*     4     4 */
                        IRExpr *   ix;                   /*     8     4 */
                        Int        bias;                 /*    12     4 */
                } GetI;                                  /*          12 */
                struct {
                        IRTemp     tmp;                  /*     4     4 */
                } RdTmp;                                 /*           4 */
                struct {
                        IROp       op;                   /*     4     4 */
                        IRExpr *   arg1;                 /*     8     4 */
                        IRExpr *   arg2;                 /*    12     4 */
                        IRExpr *   arg3;                 /*    16     4 */
                        IRExpr *   arg4;                 /*    20     4 */
                } Qop;                                   /*          20 */
                struct {
                        IROp       op;                   /*     4     4 */
                        IRExpr *   arg1;                 /*     8     4 */
                        IRExpr *   arg2;                 /*    12     4 */
                        IRExpr *   arg3;                 /*    16     4 */
                } Triop;                                 /*          16 */
                struct {
                        IROp       op;                   /*     4     4 */
                        IRExpr *   arg1;                 /*     8     4 */
                        IRExpr *   arg2;                 /*    12     4 */
                } Binop;                                 /*          12 */
                struct {
                        IROp       op;                   /*     4     4 */
                        IRExpr *   arg;                  /*     8     4 */
                } Unop;                                  /*           8 */
                struct {
                        IREndness  end;                  /*     4     4 */
                        IRType     ty;                   /*     8     4 */
                        IRExpr *   addr;                 /*    12     4 */
                } Load;                                  /*          12 */
                struct {
                        IRConst *  con;                  /*     4     4 */
                } Const;                                 /*           4 */
                struct {
                        IRCallee * cee;                  /*     4     4 */
                        IRType     retty;                /*     8     4 */
                        IRExpr * * args;                 /*    12     4 */
                } CCall;                                 /*          12 */
                struct {
                        IRExpr *   cond;                 /*     4     4 */
                        IRExpr *   expr0;                /*     8     4 */
                        IRExpr *   exprX;                /*    12     4 */
                } Mux0X;                                 /*          12 */
        } Iex;                                           /*     4    20 */

        /* size: 24, cachelines: 1, members: 2 */
        /* last cacheline: 24 bytes */
};
struct _IRStmt {
        IRStmtTag                  tag;                  /*     0     4 */
        union {
                struct {
                } NoOp;                                  /*           0 */
                struct {
                        Addr64     addr;                 /*     4     8 */
                        Int        len;                  /*    12     4 */
                } IMark;                                 /*          12 */
                struct {
                        IRExpr *   base;                 /*     4     4 */
                        Int        len;                  /*     8     4 */
                        IRExpr *   nia;                  /*    12     4 */
                } AbiHint;                               /*          12 */
                struct {
                        Int        offset;               /*     4     4 */
                        IRExpr *   data;                 /*     8     4 */
                } Put;                                   /*           8 */
                struct {
                        IRRegArray * descr;              /*     4     4 */
                        IRExpr *   ix;                   /*     8     4 */
                        Int        bias;                 /*    12     4 */
                        IRExpr *   data;                 /*    16     4 */
                } PutI;                                  /*          16 */
                struct {
                        IRTemp     tmp;                  /*     4     4 */
                        IRExpr *   data;                 /*     8     4 */
                } WrTmp;                                 /*           8 */
                struct {
                        IREndness  end;                  /*     4     4 */
                        IRExpr *   addr;                 /*     8     4 */
                        IRExpr *   data;                 /*    12     4 */
                } Store;                                 /*          12 */
                struct {
                        IRDirty *  details;              /*     4     4 */
                } Dirty;                                 /*           4 */
                        IRExpr *   data;                 /*     8     4 */
                } WrTmp;                                 /*           8 */
                struct {
                        IREndness  end;                  /*     4     4 */
                        IRExpr *   addr;                 /*     8     4 */
                        IRExpr *   data;                 /*    12     4 */
                } Store;                                 /*          12 */
                struct {
                        IRDirty *  details;              /*     4     4 */
                } Dirty;                                 /*           4 */
                struct {
                        IRMBusEvent event;               /*     4     4 */
                } MBE;                                   /*           4 */
                struct {
                        IRExpr *   guard;                /*     4     4 */
                        IRJumpKind jk;                   /*     8     4 */
                        IRConst *  dst;                  /*    12     4 */
                } Exit;                                  /*          12 */
        } Ist;                                           /*     4    16 */

        /* size: 20, cachelines: 1, members: 2 */
        /* last cacheline: 20 bytes */
};

This should be pretty easy to reproduce, but if not I could provide
you with an .o file... I'd bisect it myself if it weren't for the fact
that libebl.a is no longer available on Debian squeeze/sid, which
means I can't build without patching the cmake :-(
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-27 15:36 pahole regression: -a no longer works? Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2009-06-26  1:29 Samuel Bronson
     [not found] ` <20090627144405.GE4981@ghostprotocols.net>
     [not found]   ` <20090627144405.GE4981-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2009-06-27 15:44     ` Samuel Bronson
     [not found]       ` <87eit5lm0u.wl%naesten-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-06-27 15:50         ` Arnaldo Carvalho de Melo
2009-06-27 16:34         ` Arnaldo Carvalho de Melo

Dwarves Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dwarves/0 dwarves/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dwarves dwarves/ https://lore.kernel.org/dwarves \
		dwarves@vger.kernel.org
	public-inbox-index dwarves

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dwarves


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git