Arnaldo Carvalho de Melo
e173712c04
[CLASSES]: Use ftype__snprintf in class_member__print
...
To fix these cases:
--- /tmp/pahole.before 2006-12-29 14:47:59.000000000 -0200
+++ /tmp/pahole.after 2007-01-02 03:16:43.000000000 -0200
@@ -52,8 +52,8 @@
/* /pub/scm/linux/kernel/git/acme/linux-2.6/net/xfrm/xfrm_user.c:1649 */
struct xfrm_link {
- int (*doit)(void /* FIXME: add parm list */); /* 0 4 */
- int (*dump)(void /* FIXME: add parm list */); /* 4 4 */
+ int (*doit)(struct sk_buff *, struct nlmsghdr *, void * *); /* 0 4 */
+ int (*dump)(struct sk_buff *, struct netlink_callback *); /* 4 4 */
}; /* size: 8, cachelines: 1 */
/* last cacheline: 8 bytes */
/* definitions: 1 */
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-02 03:18:33 -02:00
Arnaldo Carvalho de Melo
8a4df0e070
[CLASSES]: Introduce DW_TAG_subroutine_type specific parser
...
So that we handle DW_TAG_formal_parameters in this tag, fixing
these cases:
--- /tmp/ctracer.c.before 2006-12-29 13:27:24.000000000 -0200
+++ /tmp/ctracer.c 2007-01-02 02:34:18.000000000 -0200
<SNIP>
@@ -62,7 +62,7 @@
}; /* size: 68, cachelines: 3 */
/* last cacheline: 4 bytes */
-typedef int (*kretprobe_handler_t)(void /* FIXME: add parm list */);
+typedef int (*kretprobe_handler_t)(struct kretprobe_instance *, struct pt_regs *);
/* /pub/scm/linux/kernel/git/acme/linux-2.6/include/linux/list.h:607 */
struct hlist_head {
struct hlist_node * first; /* 0 4 */
[acme@newtoy ctracer_example]$
--- /tmp/pfunct.before 2006-12-30 16:18:25.000000000 -0200
+++ /tmp/pfunct.after 2007-01-02 02:08:50.000000000 -0200
@@ -249,7 +249,7 @@
/* definitions: 1 */
/* /pub/scm/linux/kernel/git/acme/linux-2.6/lib/klist.c:57 */
-void klist_init(struct klist * k, * get, * put);
+void klist_init(struct klist * k, void (*get)(struct klist_node *), void (*put)(struct klist_node *));
/* size: 12, inline expansions: 1 (5 bytes) */
/* definitions: 1 */
The struct/union case still needs fixing, but we're getting there...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-02 02:42:33 -02:00
Arnaldo Carvalho de Melo
0f5b2d57ce
[CLASSES]: Add missing ftype__has_parm_of_type prototype
...
And fix its usage in ctracer and pfunct, guess the cmake adoption
is still a little problematic...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-02 02:37:24 -02:00
Arnaldo Carvalho de Melo
f49e492555
[CLASSES]: Make the derived class helpers be static inline
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-02 02:11:38 -02:00
Arnaldo Carvalho de Melo
29fc67353c
[CLASSES]: Pave the way to reuse DW_TAG_subprogram prototype code
...
Will be reused when handling DW_TAG_subprogram_type more comprehensively, in
the upcoming csets.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-30 16:34:20 -02:00
Arnaldo Carvalho de Melo
e78718148d
[CLASSES]: Introduce struct base_type
...
To use less memory to represent DW_TAG_base_type tags.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-29 20:58:03 -02:00
Arnaldo Carvalho de Melo
c83a88bd77
[CLASSES]: Use only a struct tag to represent DW_TAG_{pointer,const}_type tags
...
This reduces by 8MB the dtagnames memory footprint when processing a qemu
vmlinux, that now uses ~79MB.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-29 16:34:11 -02:00
Arnaldo Carvalho de Melo
bbf3f8d95e
[CLASSES]: Become struct tag centric
...
So far struct class was being used as the main data structure, switch to struct
tag, that already was the top of the tag hierarchy, being a struct class
ancestor, so reflect that and stop using struct class as the catch all class,
as a started DW_TAG_array_type tags are now represented by a new class, struct
array_type, reducing the size of struct class and reducing DW__TAG_array_type
instance memory usage.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-29 15:28:58 -02:00
Arnaldo Carvalho de Melo
5079fbea92
[CLASSES]: Save 4 bytes in struct function
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-28 12:27:12 -02:00
Arnaldo Carvalho de Melo
594463f756
[CLASSES]: Save 12 bytes on struct class
...
With some tradeoff for the code size...
[acme@newtoy pahole]$ codiff build/libclasses.so.orig build/libclasses.so
/home/acme/pahole/classes.c:
struct class | -12
1 struct changed
class__array_nr_entries | +3
class_member__names | +3
parameter__names | +3
class__find_holes | -8
class__print_struct | -1
cu__create_new_array | +48
6 functions changed, 57 bytes added, 9 bytes removed
[acme@newtoy pahole]$
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-28 12:00:21 -02:00
Arnaldo Carvalho de Melo
43de2d269f
[CLASSES]: Use ISO C99 integer types more comprehensively
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-28 11:18:43 -02:00
Arnaldo Carvalho de Melo
95578b7694
[CLASSES]: Shrink struct class_member
...
[acme@newtoy pahole]$ codiff build/libclasses.so.orig build/libclasses.so
/home/acme/pahole/classes.c:
struct class_member | -16
1 struct changed
class_member__new | +6
class_member__names | +5
class_member__print | -9
class__find_holes | -37
class__print_struct | -22
cu__process_class | +1
6 functions changed, 12 bytes added, 68 bytes removed
[acme@newtoy pahole]$
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-28 10:09:18 -02:00
Arnaldo Carvalho de Melo
849eda4a71
[CLASSES]: Fix abstract_origin type, its a Dwarf_Off
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-28 09:38:40 -02:00
Arnaldo Carvalho de Melo
e838c259e0
[CLASSES]: low_pc and high_pc attributes are Dwarf_Addr
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-28 09:36:39 -02:00
Arnaldo Carvalho de Melo
3ac4b868aa
[CLASSES]: Introduce cus__load_dir()
...
To load directory trees, looking for files with a specified glob mask, calling
cus__load() on the ones that match and optionally recursively searching for
more matches in subdirectories.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-27 14:57:19 -02:00
Arnaldo Carvalho de Melo
b0e2c51ec8
[CLASSES]: Allow struct cus instances to share a list of defs and fwd_decls
...
So that we can extract bits from one and combine it bits from other instances,
like we'll do in ctracer, where we want to have a cus instance just to get the
kprobes definitions and forward declarations but not handle the methods in it.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-27 14:39:37 -02:00
Arnaldo Carvalho de Melo
bc5728f294
[CLASSES]: Store the high and low pc addresses in inline_expansion
...
For the ranges cases we store the lowest low_pc (in the first range) and the
highest high_pc (in the last range).
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-26 11:44:05 -02:00
Arnaldo Carvalho de Melo
3e60a747e6
[CLASSES]: Use size_t for size variables
...
uint64_t is a bit excessive.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-24 22:27:22 -02:00
Arnaldo Carvalho de Melo
7483c767f4
[CLASSES]: 'type' is also a Dwarf_Off
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-24 12:18:14 -02:00
Arnaldo Carvalho de Melo
45c40e4b8d
[CLASSES]: Use Dwarf_Off type for the cu_offset derived variables/members
...
This is part of a cleanup process were I'm revisiting the types used for
the various abstractions, using the correct libdw.h types.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-24 12:07:41 -02:00
Arnaldo Carvalho de Melo
30128e9d11
[CLASSES]: Use uint32_t for the cu id
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-24 12:00:07 -02:00
Arnaldo Carvalho de Melo
3ca40af1fd
[CLASSES]: Add support for enums
...
Be it named enums such as:
/* include/linux/pid.h:7 */
enum pid_type {
PIDTYPE_PID = 0,
PIDTYPE_PGID = 1,
PIDTYPE_SID = 2,
PIDTYPE_MAX = 3,
};
Or nameless enums inside structs:
/* include/linux/journal-head.h:14 */
typedef struct transaction_s {
journal_t * t_journal; /* 0 4 */
tid_t t_tid; /* 4 4 */
enum {
T_RUNNING = 0,
T_LOCKED = 1,
T_RUNDOWN = 2,
T_FLUSH = 3,
T_COMMIT = 4,
T_FINISHED = 5,
} t_state; /* 8 4 */
long unsigned int t_log_start; /* 12 4 */
<SNIP>
} transaction_t; /* size: 84, cachelines: 3 */
/* last cacheline: 20 bytes */
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-24 11:56:59 -02:00
Arnaldo Carvalho de Melo
82692a819d
[CLASSES]: Export cus__emit_fwd_decl
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-23 23:33:37 -02:00
Arnaldo Carvalho de Melo
149f4f81ed
[CLASSES]: Introduce functions to rebuild structs, typedefs, etc
...
So that we can build a module that doesn't uses #includes to get these
definitions.
More work to be done for enums, etc, but this already is enough for
ctracer to handle tracing the sk_buff methods in vmlinux.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-23 19:29:27 -02:00
Arnaldo Carvalho de Melo
af9adf0b9a
[CLASSES]: Introduce cus__find_function_by_name
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-23 18:46:05 -02:00
Arnaldo Carvalho de Melo
7d581ce17c
[CLASSES]: Introduce list heads for definitions and forward declarations
...
In struct cus, that will be used when rebuilding class definitions for
enums, struct pointers, struct definitions, etc, in ctracer for a start.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-23 18:30:48 -02:00
Arnaldo Carvalho de Melo
66ef6a39ba
[CLASSES]: Add optional prefix and suffix parameters to class__print
...
That will be used when typedefs are being emitted, etc.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-23 18:09:47 -02:00
Arnaldo Carvalho de Melo
27af1f615b
[CLASSES]: Introduce parameter__names
...
Some rework is needed to make class_member__names and parameter__names to share
more code, but there are things like bitfields that are exclusive to
class_member entries, etc.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-20 20:40:13 -02:00
Arnaldo Carvalho de Melo
973d243189
[CLASSES]: Introduce tag__fwd_decl
...
To emit forward declarations for types, used in ctracer.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-20 14:10:07 -02:00
Arnaldo Carvalho de Melo
e15d528941
[CLASSES]: Add a 'visited' flag to struct class
...
So that tools can mark it as being processed already, such as when ctracer
needs to emit forward declarations for types in function parameters or return
types.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-20 13:49:51 -02:00
Arnaldo Carvalho de Melo
3e7e387ddb
[CLASSES]: Move passing the object file name from cus__new to cus__load
...
So that we can load many object files, that is what the next csets will
do, to recursively look for files with debug info in a build tree, such
as the kernel one.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-20 12:35:45 -02:00
Arnaldo Carvalho de Melo
4a015cf738
[CLASSES]: Add list nodes to struct cu and function to be used by tools
...
Any tool can use it, first one will be ctracer, the class tracer.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-20 12:07:09 -02:00
Arnaldo Carvalho de Melo
5cb0779231
[CLASSES]: Pass the cookie to the filter in cu__for_each_function
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-20 12:05:29 -02:00
Arnaldo Carvalho de Melo
5484abff49
[CLASSES]: Move function__has_parameter_of_type from pfunct to libclasses
...
Will be used by a new tool, ctracer.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-20 12:03:12 -02:00
Arnaldo Carvalho de Melo
0dd2519bff
[CLASSES]: Export class__name
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-19 09:11:17 -02:00
Arnaldo Carvalho de Melo
a7f819ccb2
[CLASSES]: Remove some now unused functions
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-18 17:14:31 -02:00
Arnaldo Carvalho de Melo
bd4dfbccb9
[CLASSES]: Add a filter to cu__for_each_function
...
Same purpose as in the one in cu__for_each_class.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-18 15:35:31 -02:00
Arnaldo Carvalho de Melo
e70860fe11
[CLASSES]: Constify print routines class parameter
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-18 09:29:41 -02:00
Arnaldo Carvalho de Melo
b515ca2386
[CLASSES]: Support multidimensional arrays
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-08 12:58:46 -02:00
Arnaldo Carvalho de Melo
b45b9f6a95
[CLASSES]: Add a ->declaration member to struct class
...
For cases where the compiler doesn't emits the whole struct definition for
things like base classes that don't have any of its members acessed, just the
ones in its descendants.
Will be used to avoid emiting hole anottations, since we don't have the
size of these classes we can't say if its smaller than the space allocated
by the compiler.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-07 20:54:45 -02:00
Arnaldo Carvalho de Melo
41f58c52ca
[CLASSES]: Make tag_name return "class" if object file is C++
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-07 17:21:52 -02:00
Arnaldo Carvalho de Melo
82892cd9dd
[CLASSES]: First stab at implementing class__find_bit_hole
...
This new function searches the first member before the one being traversed that
has a bit hole (or byte_hole, I've just normalised it on bits to make it
generic) that can be used to combine with the class_member at hand to possibly
kill a hole, possibly because for now it doesn't guarantees that moving the
member being traversed to just after the hole after the member returned by
class__find_bit_hole will indeed reduce the struct size, but its a good first
stab, next csets should provide a member to start from so that we can try to
find other holes after the one that proved not enough to reduce the struct
size.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-07 16:11:47 -02:00
Arnaldo Carvalho de Melo
a373c28ba9
[CLASSES]: Find bit holes
...
An example is worth a thousand words, look for "XXX ... bit hole, try to pack"
and the stats at the bottom:
[acme@newtoy net-2.6]$ pahole ../OUTPUT/qemu/net-2.6/fs/inode.o task_struct
/* include2/asm/system.h:11 */
struct task_struct {
volatile long int state; /* 0 4 */
struct thread_info * thread_info; /* 4 4 */
atomic_t usage; /* 8 4 */
long unsigned int flags; /* 12 4 */
long unsigned int ptrace; /* 16 4 */
int lock_depth; /* 20 4 */
int load_weight; /* 24 4 */
int prio; /* 28 4 */
/* --- cacheline 1 boundary (32 bytes) --- */
int static_prio; /* 32 4 */
int normal_prio; /* 36 4 */
struct list_head run_list; /* 40 8 */
struct prio_array * array; /* 48 4 */
short unsigned int ioprio; /* 52 2 */
/* XXX 2 bytes hole, try to pack */
long unsigned int sleep_avg; /* 56 4 */
long long unsigned int timestamp; /* 60 8 */
/* --- cacheline 2 boundary (64 bytes) was 4 bytes ago --- */
long long unsigned int last_ran; /* 68 8 */
long long unsigned int sched_time; /* 76 8 */
enum sleep_type sleep_type; /* 84 4 */
long unsigned int policy; /* 88 4 */
cpumask_t cpus_allowed; /* 92 4 */
/* --- cacheline 3 boundary (96 bytes) --- */
unsigned int time_slice; /* 96 4 */
unsigned int first_time_slice; /* 100 4 */
struct list_head tasks; /* 104 8 */
struct list_head ptrace_children; /* 112 8 */
struct list_head ptrace_list; /* 120 8 */
/* --- cacheline 4 boundary (128 bytes) --- */
struct mm_struct * mm; /* 128 4 */
struct mm_struct * active_mm; /* 132 4 */
struct linux_binfmt * binfmt; /* 136 4 */
long int exit_state; /* 140 4 */
int exit_code; /* 144 4 */
int exit_signal; /* 148 4 */
int pdeath_signal; /* 152 4 */
long unsigned int personality; /* 156 4 */
/* --- cacheline 5 boundary (160 bytes) --- */
unsigned int did_exec:1; /* 160 4 */
/* XXX 31 bits hole, try to pack */
pid_t pid; /* 164 4 */
pid_t tgid; /* 168 4 */
struct task_struct * real_parent; /* 172 4 */
struct task_struct * parent; /* 176 4 */
struct list_head children; /* 180 8 */
struct list_head sibling; /* 188 8 */
/* --- cacheline 6 boundary (192 bytes) was 4 bytes ago --- */
struct task_struct * group_leader; /* 196 4 */
struct pid_link pids[3]; /* 200 36 */
/* --- cacheline 7 boundary (224 bytes) was 12 bytes ago --- */
struct list_head thread_group; /* 236 8 */
struct completion * vfork_done; /* 244 4 */
int * set_child_tid; /* 248 4 */
int * clear_child_tid; /* 252 4 */
/* --- cacheline 8 boundary (256 bytes) --- */
long unsigned int rt_priority; /* 256 4 */
cputime_t utime; /* 260 4 */
cputime_t stime; /* 264 4 */
long unsigned int nvcsw; /* 268 4 */
long unsigned int nivcsw; /* 272 4 */
struct timespec start_time; /* 276 8 */
long unsigned int min_flt; /* 284 4 */
/* --- cacheline 9 boundary (288 bytes) --- */
long unsigned int maj_flt; /* 288 4 */
cputime_t it_prof_expires; /* 292 4 */
cputime_t it_virt_expires; /* 296 4 */
long long unsigned int it_sched_expires; /* 300 8 */
struct list_head cpu_timers[3]; /* 308 24 */
/* --- cacheline 10 boundary (320 bytes) was 12 bytes ago --- */
uid_t uid; /* 332 4 */
uid_t euid; /* 336 4 */
uid_t suid; /* 340 4 */
uid_t fsuid; /* 344 4 */
gid_t gid; /* 348 4 */
/* --- cacheline 11 boundary (352 bytes) --- */
gid_t egid; /* 352 4 */
gid_t sgid; /* 356 4 */
gid_t fsgid; /* 360 4 */
struct group_info * group_info; /* 364 4 */
kernel_cap_t cap_effective; /* 368 4 */
kernel_cap_t cap_inheritable; /* 372 4 */
kernel_cap_t cap_permitted; /* 376 4 */
unsigned int keep_capabilities:1; /* 380 4 */
/* XXX 31 bits hole, try to pack */
/* --- cacheline 12 boundary (384 bytes) --- */
struct user_struct * user; /* 384 4 */
struct key * request_key_auth; /* 388 4 */
struct key * thread_keyring; /* 392 4 */
unsigned char jit_keyring; /* 396 1 */
unsigned char fpu_counter; /* 397 1 */
/* XXX 2 bytes hole, try to pack */
int oomkilladj; /* 400 4 */
char comm[16]; /* 404 16 */
/* --- cacheline 13 boundary (416 bytes) was 4 bytes ago --- */
int link_count; /* 420 4 */
int total_link_count; /* 424 4 */
struct sysv_sem sysvsem; /* 428 4 */
struct thread_struct thread; /* 432 656 */
/* --- cacheline 34 boundary (1088 bytes) --- */
struct fs_struct * fs; /* 1088 4 */
struct files_struct * files; /* 1092 4 */
struct nsproxy * nsproxy; /* 1096 4 */
struct signal_struct * signal; /* 1100 4 */
struct sighand_struct * sighand; /* 1104 4 */
sigset_t blocked; /* 1108 8 */
sigset_t real_blocked; /* 1116 8 */
/* --- cacheline 35 boundary (1120 bytes) was 4 bytes ago --- */
sigset_t saved_sigmask; /* 1124 8 */
struct sigpending pending; /* 1132 16 */
long unsigned int sas_ss_sp; /* 1148 4 */
/* --- cacheline 36 boundary (1152 bytes) --- */
size_t sas_ss_size; /* 1152 4 */
int (*notifier)(); /* 1156 4 */
void * notifier_data; /* 1160 4 */
sigset_t * notifier_mask; /* 1164 4 */
void * security; /* 1168 4 */
struct audit_context * audit_context; /* 1172 4 */
seccomp_t seccomp; /* 1176 0 */
u32 parent_exec_id; /* 1176 4 */
u32 self_exec_id; /* 1180 4 */
/* --- cacheline 37 boundary (1184 bytes) --- */
spinlock_t alloc_lock; /* 1184 40 */
/* --- cacheline 38 boundary (1216 bytes) was 8 bytes ago --- */
spinlock_t pi_lock; /* 1224 40 */
/* --- cacheline 39 boundary (1248 bytes) was 16 bytes ago --- */
struct plist_head pi_waiters; /* 1264 20 */
/* --- cacheline 40 boundary (1280 bytes) was 4 bytes ago --- */
struct rt_mutex_waiter * pi_blocked_on; /* 1284 4 */
struct mutex_waiter * blocked_on; /* 1288 4 */
unsigned int irq_events; /* 1292 4 */
int hardirqs_enabled; /* 1296 4 */
long unsigned int hardirq_enable_ip; /* 1300 4 */
unsigned int hardirq_enable_event; /* 1304 4 */
long unsigned int hardirq_disable_ip; /* 1308 4 */
/* --- cacheline 41 boundary (1312 bytes) --- */
unsigned int hardirq_disable_event; /* 1312 4 */
int softirqs_enabled; /* 1316 4 */
long unsigned int softirq_disable_ip; /* 1320 4 */
unsigned int softirq_disable_event; /* 1324 4 */
long unsigned int softirq_enable_ip; /* 1328 4 */
unsigned int softirq_enable_event; /* 1332 4 */
int hardirq_context; /* 1336 4 */
int softirq_context; /* 1340 4 */
/* --- cacheline 42 boundary (1344 bytes) --- */
u64 curr_chain_key; /* 1344 8 */
int lockdep_depth; /* 1352 4 */
struct held_lock held_locks[30]; /* 1356 1200 */
/* --- cacheline 79 boundary (2528 bytes) was 28 bytes ago --- */
unsigned int lockdep_recursion; /* 2556 4 */
/* --- cacheline 80 boundary (2560 bytes) --- */
void * journal_info; /* 2560 4 */
struct reclaim_state * reclaim_state; /* 2564 4 */
struct backing_dev_info * backing_dev_info; /* 2568 4 */
struct io_context * io_context; /* 2572 4 */
long unsigned int ptrace_message; /* 2576 4 */
siginfo_t * last_siginfo; /* 2580 4 */
wait_queue_t * io_wait; /* 2584 4 */
u64 rchar; /* 2588 8 */
/* --- cacheline 81 boundary (2592 bytes) was 4 bytes ago --- */
u64 wchar; /* 2596 8 */
u64 syscr; /* 2604 8 */
u64 syscw; /* 2612 8 */
struct robust_list_head * robust_list; /* 2620 4 */
/* --- cacheline 82 boundary (2624 bytes) --- */
struct list_head pi_state_list; /* 2624 8 */
struct futex_pi_state * pi_state_cache; /* 2632 4 */
atomic_t fs_excl; /* 2636 4 */
struct rcu_head rcu; /* 2640 8 */
struct pipe_inode_info * splice_pipe; /* 2648 4 */
}; /* size: 2656, cachelines: 83 */
/* sum members: 2648, holes: 2, sum holes: 4 */
/* bit holes: 2, sum bit holes: 62 bits */
/* padding: 4 */
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-07 12:26:50 -02:00
Arnaldo Carvalho de Melo
5c777371cd
[CLASSES]: Make cu__for_each_class receive a filter
...
Same semantic as in the cus__for_each_cu filter.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-01 00:00:24 -02:00
Arnaldo Carvalho de Melo
e5a400d01f
[CLASSES]: Make cus__for_each_cu receive an optional filter
...
To simplify the callsites and make implementing the same thing on the other
dwarves (prefcnt, pfunct, etc) easy.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-30 23:48:34 -02:00
Arnaldo Carvalho de Melo
b31090f722
[CLASSES]: Move more stuff to the lexblock namespace
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-20 16:51:42 -02:00
Arnaldo Carvalho de Melo
6a3cc448d1
[CLASSES]: Introduce struct lexblock
...
To represent DW_TAG_lexical_block, for now just group the lists of
labels, inline expansions and variables, struct function now has
the root of the tree as ->lexblock.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-20 16:38:47 -02:00
Arnaldo Carvalho de Melo
460c5d91f4
[CLASSES]: Implement DW_TAG_label full support
...
And use it in function__print:
[acme@newtoy net-2.6.20]$ pfunct -Ti net/ipv4/tcp_ipv4.o tcp_v4_err
/* net/ipv4/tcp_ipv4.c:352 */
void tcp_v4_err(struct sk_buff * skb, u32 info);
{
struct iphdr * iph; // 353
struct tcphdr * th; // 354
struct tcp_sock * tp; // 355
struct inet_sock * inet; // 356
int type; // 357
int code; // 358
struct sock * sk; // 359
__u32 seq; // 360
int err; // 361
inet_lookup(); // 368
inet_iif(); // 368
inet_twsk_put(); // 375
__fswab32(); // 390
do_pmtu_discovery(); // 410
struct request_sock * req; // 424
struct request_sock * * prev; // 424
inet_csk_reqsk_queue_drop(); // 450
tcp_done(); // 462
out: // 493
sock_put(); // 495
}
/* size: 1538, variables: 11, goto labels: 1, inline expansions: 10 (1066 bytes) */
Now to support DW_TAG_lexical_block, then to study libelf to fill in the
missing parts with assembly (or C snippets automagically rebuilt from the
assembly ;) ).
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-20 16:17:42 -02:00
Arnaldo Carvalho de Melo
139cfd3318
[CLASSES]: Enhance function__print
...
Introducing function__print_body, that orders the tags in a function by the
souce code line where it was declared or inlined.
This finally takes advantage of the struct tag "superclass", more to come in
the form of lexical blocks and goto labels.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-20 15:43:39 -02:00
Arnaldo Carvalho de Melo
a1c8aefe4e
[CLASSES]: Support DW_TAG_unspecified_parameters
...
aka "..."
[acme@newtoy net-2.6.20]$ pfunct kernel/panic.o panic
/* kernel/panic.c:61 */
void panic(const char * fmt, ...);
/* size: 241, variables: 3, inline expansions: 1 (3 bytes) */
[acme@newtoy net-2.6.20]$
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-18 21:15:36 -02:00