Commit Graph

792 Commits

Author SHA1 Message Date
Arnaldo Carvalho de Melo 5bc698ab1b [DUTIL]: Move __unused definition to dutil.h
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-16 14:47:59 -02:00
Arnaldo Carvalho de Melo de92e59342 [RPM]: spec file adjustments to follow the Fedora cmake guidelines
http://fedoraproject.org/wiki/Packaging/cmake

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-09 20:47:23 -02:00
Arnaldo Carvalho de Melo c6c71398cd [RPM]: 1.3 release
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-08 02:24:01 -02:00
Arnaldo Carvalho de Melo c4ee21aa12 [DWARVES]: Kill some warnings by turning ident variables to int
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-08 01:56:03 -02:00
Arnaldo Carvalho de Melo 27fd61cae4 [CTRACER]: Remove unused variable
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-08 01:53:51 -02:00
Arnaldo Carvalho de Melo bd4d998ea2 [CODIFF]: Remove unused goto label
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-08 01:50:25 -02:00
Arnaldo Carvalho de Melo 114b534f32 [DWARVES]: Check if a bitfield that was combined with a previous field is at the end of the struct
This was found on an old openbsd kernel image that Leonardo Chiquito built
enabling DWARF instead of the default, STABS debugging format 8)

Just this struct has this characteristic:

struct ricoh_is410_window_data {
        struct scsi_window_data    window_data;          /*     0    48 */
        u_int8_t                   res1;                 /*    48     1 */
        u_int8_t                   res2;                 /*    49     1 */

        /* Bitfield combined with previous fields */

        u_int                      mrif:1;               /*    48:15  4 */
        u_int                      filtering:3;          /*    48:12  4 */
        u_int                      gamma_id:4;           /*    48: 8  4 */

        /* size: 52, cachelines: 1 */
        /* bit_padding: 24 bits */
        /* last cacheline: 52 bytes */
};

Now there are no BRAIN FART ALERT!s when paholing openbsd, yay!

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-08 01:46:53 -02:00
Arnaldo Carvalho de Melo b55ede8af2 [DWARVES]: Handle having a bitfield starting at the same offset as a non-bitfield
One more BRAIN FART ALERT! hits the dust.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-08 01:39:29 -02:00
Arnaldo Carvalho de Melo dcb2563bfe [DWARVES]: Fix class__fprintf wrt bitfields combined with previous/next small fields
Lots of BRAIN FART ALERT!s removed!

There is still a problem in class__find_holes where we don't catch bitfields
that are combined with previous fields where the byte offset for the bitfield
is the same as the previous field. This happens when the compiler combines a
bitfield with real byte size > 1 just after a one or two bytes field that is at
an alignment boundary.

Will fix later.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-07 19:27:52 -02:00
Arnaldo Carvalho de Melo 7953ff3ed3 [DWARVES]: Mark the end of bitfields in class__find_holes
To ease some algorithms where we have to find the transition from
one bitfield to another.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-07 19:24:59 -02:00
Arnaldo Carvalho de Melo 68be38bddd [DWARVES]: Properly find holes in bitfields
Make class__find_holes understand that when a byte offset goes backward it is
because the compiler is "combining" small bitfields with previous fields, and
using from the end of the combined bitfield + small fields. This made your
head hurt, huh? One example:

struct usb_bus {
	struct device *            controller;           /*     0     8 */
	int                        busnum;               /*     8     4 */

	/* XXX 4 bytes hole, try to pack */

	char *                     bus_name;             /*    16     8 */
	u8                         uses_dma;             /*    24     1 */
	u8                         otg_port;             /*    25     1 */

	/* Bitfield combined with previous fields */

	unsigned int               is_b_host:1;          /*    24:15  4 */
	unsigned int               b_hnp_enable:1;       /*    24:14  4 */

	/* XXX 14 bits hole, try to pack */

	int                        devnum_next;          /*    28     4 */
	struct usb_devmap          devmap;               /*    32    16 */
<SNIP>
};

See? is_b_host:1 .. b_hnp_enable:1 makes a bitfield of just two bits.

The programmer decided to make this a 'unsigned int' bitfield, so taking 4 bytes.

And placed this "4" bytes bitfield just after two fields of one byte.

The compiler put the "4" bytes bitfield "in the same place" as the "uses_dma"
field, but its really not clobbering it neither "otg_port", as it allocates it
from (offset 24 + sizeof(unsigned int) - 1), backwards.

So at the end there is a, now correctly calculated, 14 bits hole, and that
matches the bit offset used for the last field, that is "14", as offsets for
bits and bytes starts at zero, all is explained now.

One last thing is that since we actually have 14 bits we in fact have a one
byte hole + a 6 bits hole, but that should be clear (haha) for those looking
for holes :-)

Nah, just run pahole reorganize on this beast and you'll have (for the complete
structure, with the <SNIP> part back in:

struct usb_bus {
	struct device *            controller;           /*     0     8 */
	int                        busnum;               /*     8     4 */
	unsigned char              is_b_host:1;          /*    12:247  1 */
	unsigned char              b_hnp_enable:1;       /*    12:246  1 */

	/* XXX 6 bits hole, try to pack */

	u8                         otg_port;             /*    13     1 */
	u8                         uses_dma;             /*    14     1 */

	/* XXX 1 byte hole, try to pack */

	char *                     bus_name;             /*    16     8 */
	int                        bandwidth_isoc_reqs;  /*    24     4 */
	int                        devnum_next;          /*    28     4 */
	struct usb_devmap          devmap;               /*    32    16 */
	struct usb_device *        root_hub;             /*    48     8 */
	struct list_head           bus_list;             /*    56    16 */
	/* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
	int                        bandwidth_allocated;  /*    72     4 */
	int                        bandwidth_int_reqs;   /*    76     4 */
	struct dentry *            usbfs_dentry;         /*    80     8 */
	struct class_device *      class_dev;            /*    88     8 */
	struct mon_bus *           mon_bus;              /*    96     8 */
	int                        monitored;            /*   104     4 */

	/* size: 112, cachelines: 2 */
	/* sum members: 107, holes: 1, sum holes: 1 */
	/* bit holes: 1, sum bit holes: 6 bits */
	/* padding: 4 */
	/* last cacheline: 48 bytes */
};   /* saved 8 bytes! */

And we save 8 bytes and reduce the previous complexity. Hey, but look at those
bit offsets at is_b_host and b_hnp_enable... damn, exposing the bit offsets I
just exposed another bug, that is: the reorganization code is not fixing up the
bit offsets, one more for the TODO list, nah, just compile it and pass the
results back to the dwarves and we get:

struct usb_bus {
	struct device *            controller;           /*     0     8 */
	int                        busnum;               /*     8     4 */
	unsigned char              is_b_host:1;          /*    12: 7  1 */
	unsigned char              b_hnp_enable:1;       /*    12: 6  1 */

	/* XXX 6 bits hole, try to pack */

	u8                         otg_port;             /*    13     1 */
	u8                         uses_dma;             /*    14     1 */

	/* XXX 1 byte hole, try to pack */

	char *                     bus_name;             /*    16     8 */
	int                        bandwidth_isoc_reqs;  /*    24     4 */
	int                        devnum_next;          /*    28     4 */
	struct usb_devmap          devmap;               /*    32    16 */
	struct usb_device *        root_hub;             /*    48     8 */
	struct list_head           bus_list;             /*    56    16 */
	/* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
	int                        bandwidth_allocated;  /*    72     4 */
	int                        bandwidth_int_reqs;   /*    76     4 */
	struct dentry *            usbfs_dentry;         /*    80     8 */
	struct class_device *      class_dev;            /*    88     8 */
	struct mon_bus *           mon_bus;              /*    96     8 */
	int                        monitored;            /*   104     4 */

	/* size: 112, cachelines: 2 */
	/* sum members: 107, holes: 1, sum holes: 1 */
	/* bit holes: 1, sum bit holes: 6 bits */
	/* padding: 4 */
	/* last cacheline: 48 bytes */
};

See? this time gcc fixed up things for us and even agreed on the reorganization
the dwarves did! 8-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-07 15:03:27 -02:00
Arnaldo Carvalho de Melo 31d20380cc [DWARVES]: Print the bit offset too
Helps understanding how bitfields really work, and after all it is just
confusing, not wrong.

See this one:

struct usb_bus {
	struct device *      controller;       /*   0     8 */
	int                  busnum;           /*   8     4 */

	/* XXX 4 bytes hole, try to pack */

	char *               bus_name;         /*  16     8 */
	u8                   uses_dma;         /*  24     1 */
	u8                   otg_port;         /*  25     1 */

	/* WARNING: DWARF offset=24, real offset=26 */

	unsigned int         is_b_host:1;      /*  24:15  4 */
	unsigned int         b_hnp_enable:1;   /*  24:14  4 */

	/* XXX 30 bits hole, try to pack */

	int                  devnum_next;      /*  28     4 */
<SNIP>
};

So the bitfield _really_ is at offset 24 and the "WARNING:" above is just
pahole not understanding how it works, i.e. it starts at 24 and since the
bitfield has a 'unsigned int' as its base type it goes from 24 to 27, the
offsets start at the end, i.e. from byte 27 back to byte 27, but as only two
bits are used, it puts bit padding at the end, at bit offset 0, that is the
last bit in byte 27 and uses the first bits of byte 26 at bit offset 14 and 15.

Now to make libdwarves finally understand this convention.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-07 14:12:35 -02:00
Arnaldo Carvalho de Melo 6f40c17161 [RPM]: 1.2 release
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-07 11:38:06 -02:00
Arnaldo Carvalho de Melo 07e0974f2c [DWARVES]: Add sanity check when calculating size from DWARF offsets
This struct, from the linux kernel:

struct usb_bus {
        struct device *            controller;           /*     0     8 */
        int                        busnum;               /*     8     4 */
        char *                     bus_name;             /*    16     8 */
        u8                         uses_dma;             /*    24     1 */
        u8                         otg_port;             /*    25     1 */
        unsigned int               is_b_host:1;          /*    24     4 */
        unsigned int               b_hnp_enable:1;       /*    24     4 */
        int                        devnum_next;          /*    28     4 */
        struct usb_devmap          devmap;               /*    32    16 */
        struct usb_device *        root_hub;             /*    48     8 */
        struct list_head           bus_list;             /*    56    16 */
        int                        bandwidth_allocated;  /*    72     4 */
        int                        bandwidth_int_reqs;   /*    76     4 */
        int                        bandwidth_isoc_reqs;  /*    80     4 */
        struct dentry *            usbfs_dentry;         /*    88     8 */
        struct class_device *      class_dev;            /*    96     8 */
        struct mon_bus *           mon_bus;              /*   104     8 */
        int                        monitored;            /*   112     4 */
};

Generates seemingly wrong DWARF when compiled with GCC:

struct usb_bus {
	struct device *            controller;           /*     0     8 */
	int                        busnum;               /*     8     4 */

	/* XXX 4 bytes hole, try to pack */

	char *                     bus_name;             /*    16     8 */
	u8                         uses_dma;             /*    24     1 */
	u8                         otg_port;             /*    25     1 */

	/* WARNING: DWARF offset=24, real offset=26 */

	unsigned int               is_b_host:1;          /*    24     4 */
	unsigned int               b_hnp_enable:1;       /*    24     4 */

	/* XXX 30 bits hole, try to pack */

	int                        devnum_next;          /*    28     4 */
	struct usb_devmap          devmap;               /*    32    16 */
	struct usb_device *        root_hub;             /*    48     8 */
	struct list_head           bus_list;             /*    56    16 */
	/* --- cacheline 1 boundary (64 bytes) was 10 bytes ago --- */
	int                        bandwidth_allocated;  /*    72     4 */
	int                        bandwidth_int_reqs;   /*    76     4 */
	int                        bandwidth_isoc_reqs;  /*    80     4 */

	/* XXX 4 bytes hole, try to pack */

	struct dentry *            usbfs_dentry;         /*    88     8 */
	struct class_device *      class_dev;            /*    96     8 */
	struct mon_bus *           mon_bus;              /*   104     8 */
	int                        monitored;            /*   112     4 */

	/* size: 120, cachelines: 2 */
	/* sum members: 110, holes: 2, sum holes: 8 */
	/* bit holes: 1, sum bit holes: 30 bits */
	/* padding: 4 */
	/* last cacheline: 56 bytes */

	/* BRAIN FART ALERT! 120 != 110 + 8(holes), diff = 2 */

};

Look at the offset for the first entry in the bitfield (is_b_host), the
compiler said in the DWARF info that it was at offset 25, when in fact it is at
offset 26 as can be seen when looking at the generated assembly code.

This previously was confusing libdwarves, as it uses subtracts the last offset
from the current offset to see what was the size the compiler really allocated
to then check if it is equal to the size of the previous entry, so as to detect
alignment holes.

The offsets are uint32_t, so cast both to int64_t when doing the calculation,
the existing code already deals with negative numbers that result in this
patologic case.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-06 21:59:42 -02:00
Arnaldo Carvalho de Melo be79835bf3 [RPM]: 1.1 release
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-06 18:23:21 -02:00
Arnaldo Carvalho de Melo 2c01420b51 [CMAKE]: Add linux.blacklist.cu to the install targets
Also updating the manifest and lib/Makefile to find it in
/usr/share/dwarves/runtime.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-06 17:43:20 -02:00
Daniel Gollub 023733eb39 [CMAKE]: CMake Build Env patches for pahole/dwarves
This is used to let cmake know that's only C project, and it shouldn't check
for C++ compiler - shrinks the build requirements ;)

+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR} )

This one allows to make out of sourcetree builds...

Signed-off-by: Daniel Gollub <dgollub@suse.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-12-03 14:43:49 -02:00
Arnaldo Carvalho de Melo 5a58b1dfef [DWARVES]: Use dwfl_getdwarf in cus__loadfl to get the buildid
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-24 00:28:15 -02:00
Arnaldo Carvalho de Melo b0a2942cde [SYSCSE]: Fix printf format specifier
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-24 00:20:15 -02:00
Arnaldo Carvalho de Melo 948addc787 [CTRACER]: Remove ctracer_jprobes.c, not used anymore
Now that ctracer generates systemtap scripts lets drop this file, its
misleading for casual readers.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-23 23:04:47 -02:00
Arnaldo Carvalho de Melo 80d6e56e1d [DWARVES_REORGANIZE]: Add a sanity check on class__demote_bitfields
In fact a BRAIN FART ALERT! 8-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-20 17:55:18 -02:00
Arnaldo Carvalho de Melo 390e2c64f4 [CTRACER]: Implement support for blacklisting CUs
In the Linux kernel, currently the only target, we can't probe the
functions in kernel/{kprobe,relay}.c.

When systemtap starts supporting uprobes, there may be other cases that
require blacklisting CUs.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-17 18:10:58 -02:00
Arnaldo Carvalho de Melo 4e406446d0 [CTRACER]: Fully qualify the probe by using the CU name
I.e. now we use this systemtap syntax:

probe mtrr_write = kernel.function("mtrr_write@arch/i386/kernel/cpu/mtrr/if.c")

mtrr_write is the function, followed by @ and then the CU, i.e. the source for
the object file (CU) where the function is.

This way we can support global namespace clashes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-17 18:10:37 -02:00
Arnaldo Carvalho de Melo 06b3a1073e [DUTIL]: utilities for the dwarves
Can be used in other projects too.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-17 18:05:40 -02:00
Arnaldo Carvalho de Melo 232b8b2684 [CTRACER]: Add support for "pointer classes"
A pointer class is one that has as one of its members a pointer to the target class,
example:

target class: sock
pointer classes: sk_buff, socket

Because struct sk_buff and struct socket has members that are pointers to a struct sock.

This way we can follow all the struct socket and struct sk_buff methods and pass to
the struct sock collector as $skb->sk, for instance.

With this we now go all the way from the socket layer to the sk_buff layer, passing thru
the sock layer.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-17 11:49:20 -02:00
Arnaldo Carvalho de Melo 515738edee [DWARVES]: Initialize tool_node on function__new
In ctracer we can find a function that receives as one of its arguments a
pointer to the target class and also a pointer to an alias or pointer class,
so we have to check if the function was already added to one of these lists:

class methods list
class aliases list
class pointer list

To avoid corrupting one of them by trying to add the function to multiple
lists.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-17 11:11:33 -02:00
Arnaldo Carvalho de Melo c10930d7e9 [PAHOLE]: Implement --find_pointers_to
To find members that are pointers to the specified class:

[acme@tab pahole]$ pahole -f sock /usr/lib/debug/lib/modules/2.6.23.1-49.fc8/vmlinux
tcp_iter_state: syn_wait_sk
ip_ra_chain: sk
netlink_set_err_data: exclude_sk
netlink_broadcast_data: exclude_sk
cn_dev: nls
cn_callback_entry: nls
cn_queue_dev: nls
sk_security_struct: sk
unix_sock: peer
unix_sock: other
request_sock: sk
mqueue_inode_info: notify_sock
sock_iocb: sk
socket: sk
sk_buff: sk

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-16 18:18:08 -02:00
Arnaldo Carvalho de Melo 6c7a1721ec [DWARVES]: Tell cu__find_struct_by_name if struct declarations are wanted
When we are looking for members of some type in all CUs it may be that in
some CU we don't have the full type, but just a declaration.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-16 18:16:56 -02:00
Arnaldo Carvalho de Melo 7631b1869b [PAHOLE]: Order the options processing
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-16 16:01:26 -02:00
Arnaldo Carvalho de Melo 3c96831dfd [CTRACER]: Find class aliases
Definition of a class alias:

A class that has as its first member a member that is of the type searched.

Example:

struct tcp6_sock {
	struct tcp_sock {
		struct inet_connection_sock {
			struct inet_sock {
				struct sock {
				}
			}
		}
	}
}

So tcp6_sock, tcp_sock, inet_connection_sock, inet_sock are aliases for sock.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-16 15:54:18 -02:00
Arnaldo Carvalho de Melo 6d2dbb484a [DWARVES_EMIT]: Export cus__find_definition
Needed in the next ctracer cset.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-16 15:48:57 -02:00
Arnaldo Carvalho de Melo 76aa7c0234 [PFUNCT]: Add --decl_info
As in pahole.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-16 13:09:59 -02:00
Arnaldo Carvalho de Melo 8ebd39d70d [DWARVES_EMIT]: Add missing newline in cus__emit_type_definitions
At that point we are emitting the definitions for the member types,
so we have to print a newline after each.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-15 15:17:01 -02:00
Arnaldo Carvalho de Melo d610140e7b [CTRACER]: Cast object to (long)
systemtap represents this as uint64_t, casting this to (void *) is not
allowed by the compiler, and as we know that this _is_ a pointer going thru
hops in systemtap, cast it back to (long) that will make this work on both
64 and 32 bit arches as sizeof(long) = sizeof(void *).

Fugly, have to learn more about systemtap internals...

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-15 14:48:52 -02:00
Arnaldo Carvalho de Melo 78ca65d6e1 [CTRACER]: Move the class and mini_class definition to ctracer_classes.h
Now that we keep base type typedefs we need their definition in both the ostra
converter and the kernel collector, so moving them to a separate file and
including gets us the typedef definitions.

This paves the way for atomic_t and other types being also collected, once I
get some pluggable data dictionary definiton on how to collect non-base types
to avoid making all of ctracer kernel specific.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-13 11:46:45 -02:00
Arnaldo Carvalho de Melo 6e575e1578 [CTRACER]: Make class__fixup_alignment fixup the padding
If some previous step did something wrong and left padding on a struct that the
compiler will not generate padding, fix it.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-13 11:41:44 -02:00
Arnaldo Carvalho de Melo 4b84be0b09 [CTRACER]: class__clone_base_types now uses tag__is_base_type
That follows typedefs to figure out that things like __u32 are in fact
base types.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-13 10:11:07 -02:00
Arnaldo Carvalho de Melo 7d4d671e99 [CTRACER]: Another fix for class__fixup_alignment
If the member size is equal to the power2 being looked up we have to
break the loop, no need to look at the smaller powers of 2.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-12 18:12:58 -02:00
Arnaldo Carvalho de Melo 71ca8dc3f6 [CTRACER]: fixup class__fixup_alignment
But don't stare at it for too long, your head will hurt. At least now it
generates a correct struct ctracer__mini_file, the linux kernel struct file
view with just the base types.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-12 16:47:42 -02:00
Arnaldo Carvalho de Melo a4801f6523 [CTRACER]: Make class__remove_member remove bitfields as a group
Its not really being used right now, but for simplification, if we even ask
for bitfields to be removed, just do it in a group.

class__remove_member needs an overhaul, to handle things like bubbling up
bitfields when one of its entries is removed.

class_member__bitfield_tail seems to be solid and should be considered to be
used when moving bitfields around in dwarves_reorganize.c.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-12 15:48:42 -02:00
Arnaldo Carvalho de Melo 461099d7a8 [LIST]: Introduce list_del_range
a <-> b <-> c <-> d <-> e <-> f <-> g

list_del_range(b, d) turns the list into:

a <-> e <-> f <-> g

This one is not in the kernel list.h, have to look if there are uses and push
it to linux if there are any.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-12 15:44:35 -02:00
Arnaldo Carvalho de Melo 7e6125add2 [CTRACER]: fix ctracer2ostra.c collector
Changed from fputs to fprintf and didn't scaped the % that should
be in the c source file generated, duh.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-12 14:06:16 -02:00
Arnaldo Carvalho de Melo 9050b05a18 [DWARVES_EMIT]: cus__emit_enumeration_definitions requires a conf
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-12 14:01:08 -02:00
Arnaldo Carvalho de Melo 320607ff19 [CTRACER_LIB]: Check if the object is NULL in ctracer__method_hook
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-12 13:20:46 -02:00
Arnaldo Carvalho de Melo 94227c57a8 [CTRACER]: Set the right name for the mini struct in class__emit_ostra_converter
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-12 13:20:22 -02:00
Arnaldo Carvalho de Melo 0284699d63 [DWARVES]: Add missing semicolon to anonymous struct union members
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-11 17:30:43 -02:00
Arnaldo Carvalho de Melo 1adaf87998 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/acme/pahole 2007-11-11 16:39:28 -02:00
Arnaldo Carvalho de Melo 5e9c2f5d86 [CTRACER]: Generate systemtap script + mini-struct collector kernel module
It generates these files:

http://oops.ghostprotocols.net:81/acme/dwarves/callgraphs/ctracer_methods.struct.sock.stp
http://oops.ghostprotocols.net:81/acme/dwarves/callgraphs/ctracer_collector.struct.sock.c

And from the collector + a relay source lib the ctracer.ko module that is
where we collect the traces + relayfs.

Run it and then with some manual collection + sorting on the relayfs files we
get this after running "make callgraph"

http://oops.ghostprotocols.net:81/acme/dwarves/callgraphs/sock.callgraph/

Further work is required to further integrate this with systemtap.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-11 16:39:03 -02:00
Arnaldo Carvalho de Melo fc6799e6ea [PAHOLE]: Fix Dwarf_Off printf warning using cast to unsigned long long
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-11 15:01:30 -02:00
Arnaldo Carvalho de Melo 031eea2786 [DWARVES_REORGANIZE]: Fix moving the last member to after a hole
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-11 13:45:00 -02:00