tracing: further shrinking trace events
Subsystems (4)
cover tracing: further shrinking trace events
patch 1-2: reduce per trace event foot print
patch 3-5: convert some trace events to DEFINE_EVENT patch 6-8: do some cleanups and thus shrink text size a bit
Save ~5.7K in text and ~2.9K in data:
text data bss dec hex filename
7018612 2034376 7251132 16304120 f8c7f8 vmlinux.o.orig
7012847 2031440 7251132 16295419 f8a5fb vmlinux.o
And save considerable memory allocated by trace_define_event().
--- include/linux/syscalls.h | 2 - include/trace/events/ext4.h | 61 +++-------- include/trace/events/sched.h | 32 ++----- include/trace/events/timer.h | 80 ++++++-------- include/trace/syscall.h | 1 - kernel/trace/trace.h | 2 + kernel/trace/trace_events.c | 209 ++++++++++++++++-------------------- kernel/trace/trace_events_filter.c | 27 +++-- kernel/trace/trace_export.c | 8 +-- kernel/trace/trace_kprobe.c | 10 +-- kernel/trace/trace_syscalls.c | 7 +- 11 files changed, 174 insertions(+), 265 deletions(-)
PATCH 1/8 tracing: Use a global field list for all syscall exit events
All syscall exit events have the same fields.
The kernel size drops 2.5K:
text data bss dec hex filename
7018612 2034376 7251132 16304120 f8c7f8 vmlinux.o.orig
7018612 2031888 7251132 16301632 f8be40 vmlinux.o
--- include/linux/syscalls.h | 2 -- include/trace/syscall.h | 1 - kernel/trace/trace_syscalls.c | 7 ++++--- 3 files changed, 4 insertions(+), 6 deletions(-)
include/linux/syscalls.h +0 -2
@@ -165,7 +165,6 @@ extern struct trace_event_functions exit_syscall_print_funcs; .enter_event = &event_enter_##sname, \ .exit_event = &event_exit_##sname, \ .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ - .exit_fields = LIST_HEAD_INIT(__syscall_meta_##sname.exit_fields), \ };#define SYSCALL_DEFINE0 (sname) \
@@ -180,7 +179,6 @@ extern struct trace_event_functions exit_syscall_print_funcs; .enter_event = &event_enter__##sname, \ .exit_event = &event_exit__##sname, \ .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ - .exit_fields = LIST_HEAD_INIT(__syscall_meta__##sname.exit_fields), \ }; \ asmlinkage long sys_##sname(void)#else
include/trace/syscall.h +0 -1
@@ -26,7 +26,6 @@ struct syscall_metadata {const char **types;const char **args;struct list_head enter_fields; -struct list_head exit_fields;struct ftrace_event_call *enter_event;struct ftrace_event_call *exit_event;
kernel/trace/trace_syscalls.c +4 -3
@@ -23,6 +23,9 @@ static int syscall_exit_register(struct ftrace_event_call *event,static int syscall_enter_define_fields (struct ftrace_event_call *call);static int syscall_exit_define_fields (struct ftrace_event_call *call); +/* All syscall exit events have the same fields */ +static LIST_HEAD (syscall_exit_fields); +static struct list_head *syscall_get_enter_fields (struct ftrace_event_call *call) {
@@ -34,9 +37,7 @@ syscall_get_enter_fields(struct ftrace_event_call *call)static struct list_head *syscall_get_exit_fields (struct ftrace_event_call *call) { -struct syscall_metadata *entry = call->data; - -return &entry->exit_fields; +return &syscall_exit_fields; }struct trace_event_functions enter_syscall_print_funcs = {
Signature · 1 line
1.6.3
[tip:perf/core] tracing: Use a global field list for all syscall exit events
Commit-ID: c9642c49aae1272d7c24008a40ae614470b957a6 Gitweb: http://git.kernel.org/tip/c9642c49aae1272d7c24008a40ae614470b957a6 Author: Li Zefan <[email protected]> AuthorDate: Mon, 24 May 2010 16:22:30 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Mon, 28 Jun 2010 17:12:44 -0400
tracing: Use a global field list for all syscall exit events
All syscall exit events have the same fields.
The kernel size drops 2.5K:
text data bss dec hex filename
7018612 2034376 7251132 16304120 f8c7f8 vmlinux.o.orig
7018612 2031888 7251132 16301632 f8be40 vmlinux.o
LKML-Reference: <[email protected]>
--- include/linux/syscalls.h | 2 -- include/trace/syscall.h | 1 - kernel/trace/trace_syscalls.c | 7 ++++--- 3 files changed, 4 insertions(+), 6 deletions(-)
include/linux/syscalls.h +0 -2
@@ -165,7 +165,6 @@ extern struct trace_event_functions exit_syscall_print_funcs; .enter_event = &event_enter_##sname, \ .exit_event = &event_exit_##sname, \ .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ - .exit_fields = LIST_HEAD_INIT(__syscall_meta_##sname.exit_fields), \ };#define SYSCALL_DEFINE0 (sname) \
@@ -180,7 +179,6 @@ extern struct trace_event_functions exit_syscall_print_funcs; .enter_event = &event_enter__##sname, \ .exit_event = &event_exit__##sname, \ .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ - .exit_fields = LIST_HEAD_INIT(__syscall_meta__##sname.exit_fields), \ }; \ asmlinkage long sys_##sname(void)#else
include/trace/syscall.h +0 -1
@@ -26,7 +26,6 @@ struct syscall_metadata {const char **types;const char **args;struct list_head enter_fields; -struct list_head exit_fields;struct ftrace_event_call *enter_event;struct ftrace_event_call *exit_event;
kernel/trace/trace_syscalls.c +4 -3
@@ -23,6 +23,9 @@ static int syscall_exit_register(struct ftrace_event_call *event,static int syscall_enter_define_fields (struct ftrace_event_call *call);static int syscall_exit_define_fields (struct ftrace_event_call *call); +/* All syscall exit events have the same fields */ +static LIST_HEAD (syscall_exit_fields); +static struct list_head *syscall_get_enter_fields (struct ftrace_event_call *call) {
@@ -34,9 +37,7 @@ syscall_get_enter_fields(struct ftrace_event_call *call)static struct list_head *syscall_get_exit_fields (struct ftrace_event_call *call) { -struct syscall_metadata *entry = call->data; - -return &entry->exit_fields; +return &syscall_exit_fields; }struct trace_event_functions enter_syscall_print_funcs = {
PATCH 2/8 tracing: Don't allocate common fields for every trace events
In reply to Li ZefanEvery event has the same common fields, so it's a big waste of memory to have a copy of those fields for every event.
--- kernel/trace/trace.h | 2 + kernel/trace/trace_events.c | 113 ++++++++++++++++++++---------------- kernel/trace/trace_events_filter.c | 18 +++++- 3 files changed, 81 insertions(+), 52 deletions(-)
kernel/trace/trace.h +2 -0
@@ -766,6 +766,8 @@ struct filter_pred {int pop_n; }; +extern struct list_head ftrace_common_fields; +extern enum regex_type filter_parse_regex (char *buff,int len,char **search,int *not); extern void print_event_filter(struct ftrace_event_call *call,
kernel/trace/trace_events.c +64 -49
185 lines not on this page · raw message
kernel/trace/trace_events_filter.c +15 -3
@@ -497,12 +497,10 @@ void print_subsystem_event_filter(struct event_subsystem *system, }static struct ftrace_event_field * -find_event_field (struct ftrace_event_call *call,char *name) +__find_event_field (struct list_head *head,char *name) {struct ftrace_event_field *field; -struct list_head *head; - head =trace_get_fields (call);list_for_each_entry (field, head, link) {if (!strcmp (field->name, name))return field;
@@ -511,6 +509,20 @@ find_event_field(struct ftrace_event_call *call, char *name)return NULL ; } +static struct ftrace_event_field * +find_event_field (struct ftrace_event_call *call,char *name) +{ +struct ftrace_event_field *field; +struct list_head *head; + + field =__find_event_field (&ftrace_common_fields, name); +if (field) +return field; + + head =trace_get_fields (call); +return __find_event_field (head, name); +} +static void filter_free_pred (struct filter_pred *pred) {if (!pred)
Signature · 1 line
1.6.3
[tip:perf/core] tracing: Don't allocate common fields for every trace events
Commit-ID: 8728fe501ed562c1b46dde3c195eadec77bca033 Gitweb: http://git.kernel.org/tip/8728fe501ed562c1b46dde3c195eadec77bca033 Author: Li Zefan <[email protected]> AuthorDate: Mon, 24 May 2010 16:22:49 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Mon, 28 Jun 2010 17:12:46 -0400
tracing: Don't allocate common fields for every trace events
Every event has the same common fields, so it's a big waste of memory to have a copy of those fields for every event.
LKML-Reference: <[email protected]>
--- kernel/trace/trace.h | 2 + kernel/trace/trace_events.c | 113 ++++++++++++++++++++---------------- kernel/trace/trace_events_filter.c | 18 +++++- 3 files changed, 81 insertions(+), 52 deletions(-)
kernel/trace/trace.h +2 -0
@@ -698,6 +698,8 @@ struct filter_pred {int pop_n; }; +extern struct list_head ftrace_common_fields; +extern enum regex_type filter_parse_regex (char *buff,int len,char **search,int *not); extern void print_event_filter(struct ftrace_event_call *call,
kernel/trace/trace_events.c +64 -49
185 lines not on this page · raw message
kernel/trace/trace_events_filter.c +15 -3
@@ -497,12 +497,10 @@ void print_subsystem_event_filter(struct event_subsystem *system, }static struct ftrace_event_field * -find_event_field (struct ftrace_event_call *call,char *name) +__find_event_field (struct list_head *head,char *name) {struct ftrace_event_field *field; -struct list_head *head; - head =trace_get_fields (call);list_for_each_entry (field, head, link) {if (!strcmp (field->name, name))return field;
@@ -511,6 +509,20 @@ find_event_field(struct ftrace_event_call *call, char *name)return NULL ; } +static struct ftrace_event_field * +find_event_field (struct ftrace_event_call *call,char *name) +{ +struct ftrace_event_field *field; +struct list_head *head; + + field =__find_event_field (&ftrace_common_fields, name); +if (field) +return field; + + head =trace_get_fields (call); +return __find_event_field (head, name); +} +static void filter_free_pred (struct filter_pred *pred) {if (!pred)
PATCH 3/8 tracing: Convert some timer events to DEFINE_EVENT
In reply to Li ZefanUse DECLARE_EVENT_CLASS, and save ~2.3K:
text data bss dec hex filename
7018823 2031888 7251132 16301843 f8bf13 vmlinux.o.orig
7016727 2031696 7251132 16299555 f8b623 vmlinux.o
5 events are converted:
timer_class: timer_init, timer_expire_exit, timer_cancel
hrtimer_class: hrtimer_init, hrtimer_cancel
No change in functionality.
--- include/trace/events/timer.h | 80 +++++++++++++++++------------------------- 1 files changed, 32 insertions(+), 48 deletions(-)
include/trace/events/timer.h +32 -48
@@ -8,11 +8,7 @@#include <linux/hrtimer.h> #include <linux/timer.h> -/** -* timer_init - called when the timer is initialized -* @timer: pointer to struct timer_list -*/ -TRACE_EVENT(timer_init, +DECLARE_EVENT_CLASS(timer_class, TP_PROTO(struct timer_list *timer),
@@ -30,6 +26,17 @@ TRACE_EVENT(timer_init, );/** +* timer_init - called when the timer is initialized +* @timer: pointer to struct timer_list +*/ +DEFINE_EVENT (timer_class, timer_init, + + TP_PROTO(struct timer_list *timer), + +TP_ARGS (timer) +); + +/** * timer_start - called when the timer is started * @timer: pointer to struct timer_list * @expires: the timers expiry time
@@ -94,42 +101,22 @@ TRACE_EVENT(timer_expire_entry,* NOTE: Do NOT derefernce timer in TP_fast_assign. The pointer might * be invalid. We solely track the pointer. */ -TRACE_EVENT (timer_expire_exit, +DEFINE_EVENT (timer_class, timer_expire_exit, TP_PROTO(struct timer_list *timer), -TP_ARGS (timer), - -TP_STRUCT__entry ( - __field(void *, timer ) - ), - -TP_fast_assign ( - __entry->timer = timer; - ), - -TP_printk ("timer=%p" , __entry->timer) +TP_ARGS (timer) );/** * timer_cancel - called when the timer is canceled * @timer: pointer to struct timer_list */ -TRACE_EVENT (timer_cancel, +DEFINE_EVENT (timer_class, timer_cancel, TP_PROTO(struct timer_list *timer), -TP_ARGS (timer), - -TP_STRUCT__entry ( - __field( void *, timer ) - ), - -TP_fast_assign ( - __entry->timer = timer; - ), - -TP_printk ("timer=%p" , __entry->timer) +TP_ARGS (timer) );/**
@@ -224,14 +211,7 @@ TRACE_EVENT(hrtimer_expire_entry, (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) ); -/** -* hrtimer_expire_exit - called immediately after the hrtimer callback returns -* @timer: pointer to struct hrtimer -* -* When used in combination with the hrtimer_expire_entry tracepoint we can -* determine the runtime of the callback function. -*/ -TRACE_EVENT(hrtimer_expire_exit, +DECLARE_EVENT_CLASS(hrtimer_class, TP_PROTO(struct hrtimer *hrtimer),
@@ -249,24 +229,28 @@ TRACE_EVENT(hrtimer_expire_exit, );/** -* hrtimer_cancel - called when the hrtimer is canceled -* @hrtimer: pointer to struct hrtimer +* hrtimer_expire_exit - called immediately after the hrtimer callback returns +* @timer: pointer to struct hrtimer +* +* When used in combination with the hrtimer_expire_entry tracepoint we can +* determine the runtime of the callback function. */ -TRACE_EVENT (hrtimer_cancel, +DEFINE_EVENT (hrtimer_class, hrtimer_expire_exit, TP_PROTO(struct hrtimer *hrtimer), -TP_ARGS (hrtimer), +TP_ARGS (hrtimer) +); -TP_STRUCT__entry ( - __field( void *, hrtimer ) - ), +/** +* hrtimer_cancel - called when the hrtimer is canceled +* @hrtimer: pointer to struct hrtimer +*/ +DEFINE_EVENT (hrtimer_class, hrtimer_cancel, -TP_fast_assign ( - __entry->hrtimer = hrtimer; - ), + TP_PROTO(struct hrtimer *hrtimer), -TP_printk ("hrtimer=%p" , __entry->hrtimer) +TP_ARGS (hrtimer) );/**
Signature · 1 line
1.6.3
[tip:perf/core] tracing: Convert some timer events to DEFINE_EVENT
Commit-ID: 363d0f6490f319d0dd69b7ec7503c5f6cbab36d9 Gitweb: http://git.kernel.org/tip/363d0f6490f319d0dd69b7ec7503c5f6cbab36d9 Author: Li Zefan <[email protected]> AuthorDate: Mon, 24 May 2010 16:23:15 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Mon, 28 Jun 2010 17:12:48 -0400
tracing: Convert some timer events to DEFINE_EVENT
Use DECLARE_EVENT_CLASS, and save ~2.3K:
text data bss dec hex filename
7018823 2031888 7251132 16301843 f8bf13 vmlinux.o.orig
7016727 2031696 7251132 16299555 f8b623 vmlinux.o
5 events are converted:
timer_class: timer_init, timer_expire_exit, timer_cancel
hrtimer_class: hrtimer_init, hrtimer_cancel
No change in functionality.
LKML-Reference: <[email protected]>
--- include/trace/events/timer.h | 80 +++++++++++++++++------------------------- 1 files changed, 32 insertions(+), 48 deletions(-)
include/trace/events/timer.h +32 -48
@@ -8,11 +8,7 @@#include <linux/hrtimer.h> #include <linux/timer.h> -/** -* timer_init - called when the timer is initialized -* @timer: pointer to struct timer_list -*/ -TRACE_EVENT(timer_init, +DECLARE_EVENT_CLASS(timer_class, TP_PROTO(struct timer_list *timer),
@@ -30,6 +26,17 @@ TRACE_EVENT(timer_init, );/** +* timer_init - called when the timer is initialized +* @timer: pointer to struct timer_list +*/ +DEFINE_EVENT (timer_class, timer_init, + + TP_PROTO(struct timer_list *timer), + +TP_ARGS (timer) +); + +/** * timer_start - called when the timer is started * @timer: pointer to struct timer_list * @expires: the timers expiry time
@@ -94,42 +101,22 @@ TRACE_EVENT(timer_expire_entry,* NOTE: Do NOT derefernce timer in TP_fast_assign. The pointer might * be invalid. We solely track the pointer. */ -TRACE_EVENT (timer_expire_exit, +DEFINE_EVENT (timer_class, timer_expire_exit, TP_PROTO(struct timer_list *timer), -TP_ARGS (timer), - -TP_STRUCT__entry ( - __field(void *, timer ) - ), - -TP_fast_assign ( - __entry->timer = timer; - ), - -TP_printk ("timer=%p" , __entry->timer) +TP_ARGS (timer) );/** * timer_cancel - called when the timer is canceled * @timer: pointer to struct timer_list */ -TRACE_EVENT (timer_cancel, +DEFINE_EVENT (timer_class, timer_cancel, TP_PROTO(struct timer_list *timer), -TP_ARGS (timer), - -TP_STRUCT__entry ( - __field( void *, timer ) - ), - -TP_fast_assign ( - __entry->timer = timer; - ), - -TP_printk ("timer=%p" , __entry->timer) +TP_ARGS (timer) );/**
@@ -224,14 +211,7 @@ TRACE_EVENT(hrtimer_expire_entry, (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) ); -/** -* hrtimer_expire_exit - called immediately after the hrtimer callback returns -* @timer: pointer to struct hrtimer -* -* When used in combination with the hrtimer_expire_entry tracepoint we can -* determine the runtime of the callback function. -*/ -TRACE_EVENT(hrtimer_expire_exit, +DECLARE_EVENT_CLASS(hrtimer_class, TP_PROTO(struct hrtimer *hrtimer),
@@ -249,24 +229,28 @@ TRACE_EVENT(hrtimer_expire_exit, );/** -* hrtimer_cancel - called when the hrtimer is canceled -* @hrtimer: pointer to struct hrtimer +* hrtimer_expire_exit - called immediately after the hrtimer callback returns +* @timer: pointer to struct hrtimer +* +* When used in combination with the hrtimer_expire_entry tracepoint we can +* determine the runtime of the callback function. */ -TRACE_EVENT (hrtimer_cancel, +DEFINE_EVENT (hrtimer_class, hrtimer_expire_exit, TP_PROTO(struct hrtimer *hrtimer), -TP_ARGS (hrtimer), +TP_ARGS (hrtimer) +); -TP_STRUCT__entry ( - __field( void *, hrtimer ) - ), +/** +* hrtimer_cancel - called when the hrtimer is canceled +* @hrtimer: pointer to struct hrtimer +*/ +DEFINE_EVENT (hrtimer_class, hrtimer_cancel, -TP_fast_assign ( - __entry->hrtimer = hrtimer; - ), + TP_PROTO(struct hrtimer *hrtimer), -TP_printk ("hrtimer=%p" , __entry->hrtimer) +TP_ARGS (hrtimer) );/**
PATCH 4/8 tracing: Conver more sched events to DEFINE_EVENT
In reply to Li ZefanConvert sched_wait_task to DEFINE_EVENT, and save ~1K:
text data bss dec hex filename 104595 9424 4992 119011 1d0e3 kernel/sched.o.orig 103619 9344 4992 117955 1ccc3 kernel/sched.o
No change in functionality.
--- include/trace/events/sched.h | 32 +++++++------------------------- 1 files changed, 7 insertions(+), 25 deletions(-)
include/trace/events/sched.h +7 -25
@@ -50,31 +50,6 @@ TRACE_EVENT(sched_kthread_stop_ret, );/* -* Tracepoint for waiting on task to unschedule: -*/ -TRACE_EVENT (sched_wait_task, - - TP_PROTO(struct task_struct *p), - -TP_ARGS (p), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) -__field ( int, prio ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - ), - -TP_printk ("comm=%s pid=%d prio=%d" , - __entry->comm, __entry->pid, __entry->prio) -); - -/* * Tracepoint for waking up a task: */ DECLARE_EVENT_CLASS(sched_wakeup_template,
@@ -223,6 +198,13 @@ DEFINE_EVENT(sched_process_template, sched_process_exit, TP_ARGS(p));/* +* Tracepoint for waiting on task to unschedule: +*/ +DEFINE_EVENT (sched_process_template, sched_wait_task, + TP_PROTO(struct task_struct *p), +TP_ARGS (p)); + +/* * Tracepoint for a waiting task: */ TRACE_EVENT(sched_process_wait,
Signature · 1 line
1.6.3
[tip:perf/core] tracing: Convert more sched events to DEFINE_EVENT
Commit-ID: 210f766915207636acccba7bec42248bfe882998 Gitweb: http://git.kernel.org/tip/210f766915207636acccba7bec42248bfe882998 Author: Li Zefan <[email protected]> AuthorDate: Mon, 24 May 2010 16:23:35 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Mon, 28 Jun 2010 17:12:50 -0400
tracing: Convert more sched events to DEFINE_EVENT
Convert sched_wait_task to DEFINE_EVENT, and save ~1K:
text data bss dec hex filename 104595 9424 4992 119011 1d0e3 kernel/sched.o.orig 103619 9344 4992 117955 1ccc3 kernel/sched.o
No change in functionality.
LKML-Reference: <[email protected]>
--- include/trace/events/sched.h | 32 +++++++------------------------- 1 files changed, 7 insertions(+), 25 deletions(-)
include/trace/events/sched.h +7 -25
@@ -50,31 +50,6 @@ TRACE_EVENT(sched_kthread_stop_ret, );/* -* Tracepoint for waiting on task to unschedule: -*/ -TRACE_EVENT (sched_wait_task, - - TP_PROTO(struct task_struct *p), - -TP_ARGS (p), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) -__field ( int, prio ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - ), - -TP_printk ("comm=%s pid=%d prio=%d" , - __entry->comm, __entry->pid, __entry->prio) -); - -/* * Tracepoint for waking up a task: */ DECLARE_EVENT_CLASS(sched_wakeup_template,
@@ -240,6 +215,13 @@ DEFINE_EVENT(sched_process_template, sched_process_exit, TP_ARGS(p));/* +* Tracepoint for waiting on task to unschedule: +*/ +DEFINE_EVENT (sched_process_template, sched_wait_task, + TP_PROTO(struct task_struct *p), +TP_ARGS (p)); + +/* * Tracepoint for a waiting task: */ TRACE_EVENT(sched_process_wait,
PATCH 5/8 tracing: Convert more ext4 events to DEFINE_EVENT
In reply to Li ZefanUse DECLARE_EVENT_CLASS, and save ~2.7K:
text data bss dec hex filename 274441 7200 260 281901 44d2d fs/ext4/ext4.o.orig 271881 7040 256 279177 44289 fs/ext4/ext4.o
4 events are converted:
ext4__mb_new_pa: ext4_mb_new_inode_pa, ext4_mb_new_group_pa
ext4__mballoc: ext4_mballoc_discard, ext4_mballoc_free
No change in functionality.
--- include/trace/events/ext4.h | 61 ++++++++++++------------------------------- 1 files changed, 17 insertions(+), 44 deletions(-)
include/trace/events/ext4.h +17 -44
@@ -353,7 +353,7 @@ TRACE_EVENT(ext4_discard_blocks, jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) ); -TRACE_EVENT(ext4_mb_new_inode_pa, +DECLARE_EVENT_CLASS(ext4__mb_new_pa, TP_PROTO(struct ext4_allocation_context *ac, struct ext4_prealloc_space *pa),
@@ -381,32 +381,20 @@ TRACE_EVENT(ext4_mb_new_inode_pa, __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) ); -TRACE_EVENT (ext4_mb_new_group_pa, +DEFINE_EVENT (ext4__mb_new_pa, ext4_mb_new_inode_pa, + TP_PROTO(struct ext4_allocation_context *ac, struct ext4_prealloc_space *pa), -TP_ARGS (ac, pa), - -TP_STRUCT__entry ( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, pa_pstart ) - __field( __u32, pa_len ) -__field ( __u64, pa_lstart ) +TP_ARGS (ac, pa) +); - ), +DEFINE_EVENT (ext4__mb_new_pa, ext4_mb_new_group_pa, -TP_fast_assign ( - __entry->dev = ac->ac_sb->s_dev; - __entry->ino = ac->ac_inode->i_ino; - __entry->pa_pstart = pa->pa_pstart; - __entry->pa_len = pa->pa_len; - __entry->pa_lstart = pa->pa_lstart; - ), + TP_PROTO(struct ext4_allocation_context *ac, + struct ext4_prealloc_space *pa), -TP_printk ("dev %s ino %lu pstart %llu len %u lstart %llu" , -jbd2_dev_to_name (__entry->dev), (unsigned long ) __entry->ino, - __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) +TP_ARGS (ac, pa) ); TRACE_EVENT(ext4_mb_release_inode_pa,
@@ -790,7 +778,7 @@ TRACE_EVENT(ext4_mballoc_prealloc, __entry->result_len, __entry->result_logical) ); -TRACE_EVENT(ext4_mballoc_discard, +DECLARE_EVENT_CLASS(ext4__mballoc, TP_PROTO(struct ext4_allocation_context *ac), TP_ARGS(ac),
@@ -819,33 +807,18 @@ TRACE_EVENT(ext4_mballoc_discard, __entry->result_len, __entry->result_logical) ); -TRACE_EVENT (ext4_mballoc_free, +DEFINE_EVENT (ext4__mballoc, ext4_mballoc_discard, + TP_PROTO(struct ext4_allocation_context *ac), -TP_ARGS (ac), +TP_ARGS (ac) +); -TP_STRUCT__entry ( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u32, result_logical ) - __field( int, result_start ) - __field( __u32, result_group ) -__field ( int, result_len ) - ), +DEFINE_EVENT (ext4__mballoc, ext4_mballoc_free, -TP_fast_assign ( - __entry->dev = ac->ac_inode->i_sb->s_dev; - __entry->ino = ac->ac_inode->i_ino; - __entry->result_logical = ac->ac_b_ex.fe_logical; - __entry->result_start = ac->ac_b_ex.fe_start; - __entry->result_group = ac->ac_b_ex.fe_group; - __entry->result_len = ac->ac_b_ex.fe_len; - ), + TP_PROTO(struct ext4_allocation_context *ac), -TP_printk ("dev %s inode %lu extent %u/%d/%u@%u " , -jbd2_dev_to_name (__entry->dev), (unsigned long ) __entry->ino, - __entry->result_group, __entry->result_start, - __entry->result_len, __entry->result_logical) +TP_ARGS (ac) ); TRACE_EVENT(ext4_forget,
Signature · 1 line
1.6.3
[email protected]
maintainerRe: [PATCH 5/8] tracing: Convert more ext4 events to DEFINE_EVENT
Quoted 6 lines · Li Zefan
Use
DECLARE_EVENT_CLASS, and save ~2.7K:text data bss dec hex filename 274441 7200 260 281901 44d2d fs/ext4/ext4.o.orig 271881 7040 256 279177 44289 fs/ext4/ext4.o
Quoted 8 lines
4 events are converted:
ext4__mb_new_pa:ext4_mb_new_inode_pa,ext4_mb_new_group_pa
ext4__mballoc:ext4_mballoc_discard,ext4_mballoc_freeNo change in functionality.
Signed-off-by Li Zefan <[email protected]>
Thanks, added to the ext4 tree.
- Ted
Re: [PATCH 5/8] tracing: Convert more ext4 events to DEFINE_EVENT
Quoted 9 lines · On Tue, 2010-05-25 at 10:57 -0400, [email protected] wrote:
Quoted 8 lines · Li Zefan
Use
DECLARE_EVENT_CLASS, and save ~2.7K:text data bss dec hex filename 274441 7200 260 281901 44d2d fs/ext4/ext4.o.orig 271881 7040 256 279177 44289 fs/ext4/ext4.o4 events are converted:
Quoted 8 lines
Quoted 6 lines
ext4__mb_new_pa:ext4_mb_new_inode_pa,ext4_mb_new_group_pa
ext4__mballoc:ext4_mballoc_discard,ext4_mballoc_freeNo change in functionality.
Signed-off-by Li Zefan <[email protected]>Thanks, added to the ext4 tree.
You could add...
if you want.
-- Steve
PATCH 6/8 tracing: Remove test of NULL define_fields callback
In reply to Li ZefanEvery event (or event class) has it's define_fields callback, so the test is redundant.
--- kernel/trace/trace_events.c | 28 +++++++++++++--------------- kernel/trace/trace_events_filter.c | 9 --------- 2 files changed, 13 insertions(+), 24 deletions(-)
kernel/trace/trace_events.c +13 -15
@@ -987,23 +987,21 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, id);#endif -if (call->class->define_fields) { -/* -* Other events may have the same class. Only update -* the fields if they are not already defined. -*/ - head =trace_get_fields (call); -if (list_empty (head)) { - ret = call->class->define_fields (call); -if (ret <0 ) { -pr_warning ("Could not initialize trace point" -" events/%s\n" , call->name); -return ret; - } +/* +* Other events may have the same class. Only update +* the fields if they are not already defined. +*/ + head =trace_get_fields (call); +if (list_empty (head)) { + ret = call->class->define_fields (call); +if (ret <0 ) { +pr_warning ("Could not initialize trace point" +" events/%s\n" , call->name); +return ret; } -trace_create_file ("filter" ,0644 , call->dir, call, - filter); } +trace_create_file ("filter" ,0644 , call->dir, call, + filter);trace_create_file ("format" ,0444 , call->dir, call, format);
kernel/trace/trace_events_filter.c +0 -9
@@ -639,9 +639,6 @@ static int init_subsystem_preds(struct event_subsystem *system)int err;list_for_each_entry (call, &ftrace_events, list) { -if (!call->class || !call->class->define_fields) -continue ; -if (strcmp (call->class->system, system->name) !=0 )continue ;
@@ -658,9 +655,6 @@ static void filter_free_subsystem_preds(struct event_subsystem *system)struct ftrace_event_call *call;list_for_each_entry (call, &ftrace_events, list) { -if (!call->class || !call->class->define_fields) -continue ; -if (strcmp (call->class->system, system->name) !=0 )continue ;
@@ -1263,9 +1257,6 @@ static int replace_system_preds(struct event_subsystem *system,list_for_each_entry (call, &ftrace_events, list) {struct event_filter *filter = call->filter; -if (!call->class || !call->class->define_fields) -continue ; -if (strcmp (call->class->system, system->name) !=0 )continue ;
Signature · 1 line
1.6.3
[tip:perf/core] tracing: Remove test of NULL define_fields callback
Commit-ID: c9d932cf8a1c608b676021aef0189376ba6ef151 Gitweb: http://git.kernel.org/tip/c9d932cf8a1c608b676021aef0189376ba6ef151 Author: Li Zefan <[email protected]> AuthorDate: Mon, 24 May 2010 16:24:28 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Mon, 28 Jun 2010 17:12:52 -0400
tracing: Remove test of NULL define_fields callback
Every event (or event class) has it's define_fields callback, so the test is redundant.
LKML-Reference: <[email protected]>
--- kernel/trace/trace_events.c | 28 +++++++++++++--------------- kernel/trace/trace_events_filter.c | 9 --------- 2 files changed, 13 insertions(+), 24 deletions(-)
kernel/trace/trace_events.c +13 -15
@@ -987,23 +987,21 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, id);#endif -if (call->class->define_fields) { -/* -* Other events may have the same class. Only update -* the fields if they are not already defined. -*/ - head =trace_get_fields (call); -if (list_empty (head)) { - ret = call->class->define_fields (call); -if (ret <0 ) { -pr_warning ("Could not initialize trace point" -" events/%s\n" , call->name); -return ret; - } +/* +* Other events may have the same class. Only update +* the fields if they are not already defined. +*/ + head =trace_get_fields (call); +if (list_empty (head)) { + ret = call->class->define_fields (call); +if (ret <0 ) { +pr_warning ("Could not initialize trace point" +" events/%s\n" , call->name); +return ret; } -trace_create_file ("filter" ,0644 , call->dir, call, - filter); } +trace_create_file ("filter" ,0644 , call->dir, call, + filter);trace_create_file ("format" ,0444 , call->dir, call, format);
kernel/trace/trace_events_filter.c +0 -9
@@ -639,9 +639,6 @@ static int init_subsystem_preds(struct event_subsystem *system)int err;list_for_each_entry (call, &ftrace_events, list) { -if (!call->class || !call->class->define_fields) -continue ; -if (strcmp (call->class->system, system->name) !=0 )continue ;
@@ -658,9 +655,6 @@ static void filter_free_subsystem_preds(struct event_subsystem *system)struct ftrace_event_call *call;list_for_each_entry (call, &ftrace_events, list) { -if (!call->class || !call->class->define_fields) -continue ; -if (strcmp (call->class->system, system->name) !=0 )continue ;
@@ -1263,9 +1257,6 @@ static int replace_system_preds(struct event_subsystem *system,list_for_each_entry (call, &ftrace_events, list) {struct event_filter *filter = call->filter; -if (!call->class || !call->class->define_fields) -continue ; -if (strcmp (call->class->system, system->name) !=0 )continue ;
PATCH 7/8 tracing: Remove redundant raw_init callbacks
In reply to Li Zefanraw_init callback is optional.
--- kernel/trace/trace_export.c | 8 +------- kernel/trace/trace_kprobe.c | 10 +--------- 2 files changed, 2 insertions(+), 16 deletions(-)
kernel/trace/trace_export.c +1 -7
@@ -125,12 +125,6 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call) \#include "trace_entries.h" -static int ftrace_raw_init_event (struct ftrace_event_call *call) -{ -INIT_LIST_HEAD (&call->class->fields); -return 0 ; -} -#undef __entry#define __entry REC
@@ -158,7 +152,7 @@ static int ftrace_raw_init_event(struct ftrace_event_call *call) struct ftrace_event_class event_class_ftrace_##call = { \ .system = __stringify(TRACE_SYSTEM), \ .define_fields = ftrace_define_fields_##call, \ - .raw_init = ftrace_raw_init_event, \ + .fields = LIST_HEAD_INIT(event_class_ftrace_##call.fields),\ }; \ \ struct ftrace_event_call __used \
kernel/trace/trace_kprobe.c +1 -9
@@ -1214,11 +1214,6 @@ static void probe_event_disable(struct ftrace_event_call *call) } } -static int probe_event_raw_init (struct ftrace_event_call *event_call) -{ -return 0 ; -} -#undef DEFINE_FIELD#define DEFINE_FIELD (type, item, name, is_signed) \ do { \
@@ -1486,15 +1481,12 @@ static int register_probe_event(struct trace_probe *tp)int ret;/* Initialize ftrace_event_call */ +INIT_LIST_HEAD (&call->class->fields);if (probe_is_return (tp)) { -INIT_LIST_HEAD (&call->class->fields); call->event.funcs = &kretprobe_funcs; - call->class->raw_init = probe_event_raw_init; call->class->define_fields = kretprobe_event_define_fields; }else { -INIT_LIST_HEAD (&call->class->fields); call->event.funcs = &kprobe_funcs; - call->class->raw_init = probe_event_raw_init; call->class->define_fields = kprobe_event_define_fields; }if (set_print_fmt (tp) <0 )
Signature · 1 line
1.6.3
[tip:perf/core] tracing: Remove redundant raw_init callbacks
Commit-ID: ffb9f99528574ab9a55d4c8fd22e9d3ca49efa86 Gitweb: http://git.kernel.org/tip/ffb9f99528574ab9a55d4c8fd22e9d3ca49efa86 Author: Li Zefan <[email protected]> AuthorDate: Mon, 24 May 2010 16:24:52 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Mon, 28 Jun 2010 17:12:53 -0400
tracing: Remove redundant raw_init callbacks
raw_init callback is optional.
LKML-Reference: <[email protected]>
--- kernel/trace/trace_export.c | 8 +------- kernel/trace/trace_kprobe.c | 10 +--------- 2 files changed, 2 insertions(+), 16 deletions(-)
kernel/trace/trace_export.c +1 -7
@@ -125,12 +125,6 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call) \#include "trace_entries.h" -static int ftrace_raw_init_event (struct ftrace_event_call *call) -{ -INIT_LIST_HEAD (&call->class->fields); -return 0 ; -} -#undef __entry#define __entry REC
@@ -158,7 +152,7 @@ static int ftrace_raw_init_event(struct ftrace_event_call *call) struct ftrace_event_class event_class_ftrace_##call = { \ .system = __stringify(TRACE_SYSTEM), \ .define_fields = ftrace_define_fields_##call, \ - .raw_init = ftrace_raw_init_event, \ + .fields = LIST_HEAD_INIT(event_class_ftrace_##call.fields),\ }; \ \ struct ftrace_event_call __used \
kernel/trace/trace_kprobe.c +1 -9
@@ -1214,11 +1214,6 @@ static void probe_event_disable(struct ftrace_event_call *call) } } -static int probe_event_raw_init (struct ftrace_event_call *event_call) -{ -return 0 ; -} -#undef DEFINE_FIELD#define DEFINE_FIELD (type, item, name, is_signed) \ do { \
@@ -1486,15 +1481,12 @@ static int register_probe_event(struct trace_probe *tp)int ret;/* Initialize ftrace_event_call */ +INIT_LIST_HEAD (&call->class->fields);if (probe_is_return (tp)) { -INIT_LIST_HEAD (&call->class->fields); call->event.funcs = &kretprobe_funcs; - call->class->raw_init = probe_event_raw_init; call->class->define_fields = kretprobe_event_define_fields; }else { -INIT_LIST_HEAD (&call->class->fields); call->event.funcs = &kprobe_funcs; - call->class->raw_init = probe_event_raw_init; call->class->define_fields = kprobe_event_define_fields; }if (set_print_fmt (tp) <0 )
PATCH 8/8 tracing: Remove open-coded __trace_add_event_call()
In reply to Li ZefanLet trace_module_add_events() and event_trace_init() call __trace_add_event_call().
--- kernel/trace/trace_events.c | 70 +++++++++++------------------------------- 1 files changed, 19 insertions(+), 51 deletions(-)
kernel/trace/trace_events.c +19 -51
@@ -1009,11 +1009,17 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,return 0 ; } -static int __trace_add_event_call (struct ftrace_event_call *call) +static int +__trace_add_event_call (struct ftrace_event_call *call,struct module *mod, +const struct file_operations *id, +const struct file_operations *enable, +const struct file_operations *filter, +const struct file_operations *format) {struct dentry *d_events;int ret; +/* The linker may leave blanks */ if (!call->name)return -EINVAL ;
@@ -1021,8 +1027,8 @@ static int __trace_add_event_call(struct ftrace_event_call *call) ret = call->class->raw_init (call);if (ret <0 ) {if (ret != -ENOSYS ) -pr_warning ("Could not initialize trace " -"events/%s\n" , call->name); +pr_warning ("Could not initialize trace events/%s\n" , + call->name);return ret; } }
@@ -1031,11 +1037,10 @@ static int __trace_add_event_call(struct ftrace_event_call *call)if (!d_events)return -ENOENT ; - ret =event_create_dir (call, d_events, &ftrace_event_id_fops, - &ftrace_enable_fops, &ftrace_event_filter_fops, - &ftrace_event_format_fops); + ret =event_create_dir (call, d_events, id, enable, filter, format);if (!ret)list_add (&call->list, &ftrace_events); + call->mod = mod;return ret; }
@@ -1045,7 +1050,10 @@ int trace_add_event_call(struct ftrace_event_call *call) {int ret;mutex_lock (&event_mutex); - ret =__trace_add_event_call (call); + ret =__trace_add_event_call (call,NULL , &ftrace_event_id_fops, + &ftrace_enable_fops, + &ftrace_event_filter_fops, + &ftrace_event_format_fops);mutex_unlock (&event_mutex);return ret; }
@@ -1162,8 +1170,6 @@ static void trace_module_add_events(struct module *mod) {struct ftrace_module_file_ops *file_ops =NULL ;struct ftrace_event_call *call, *start, *end; -struct dentry *d_events; -int ret; start = mod->trace_events; end = mod->trace_events + mod->num_trace_events;
@@ -1171,38 +1177,14 @@ static void trace_module_add_events(struct module *mod)if (start == end)return ; - d_events =event_trace_events_dir (); -if (!d_events) + file_ops =trace_create_file_ops (mod); +if (!file_ops)return ;for_each_event (call, start, end) { -/* The linker may leave blanks */ -if (!call->name) -continue ; -if (call->class->raw_init) { - ret = call->class->raw_init (call); -if (ret <0 ) { -if (ret != -ENOSYS ) -pr_warning ("Could not initialize trace " -"point events/%s\n" , call->name); -continue ; - } - } -/* -* This module has events, create file ops for this module -* if not already done. -*/ -if (!file_ops) { - file_ops =trace_create_file_ops (mod); -if (!file_ops) -return ; - } - call->mod = mod; - ret =event_create_dir (call, d_events, +__trace_add_event_call (call, mod, &file_ops->id, &file_ops->enable, &file_ops->filter, &file_ops->format); -if (!ret) -list_add (&call->list, &ftrace_events); } }
@@ -1333,24 +1315,10 @@ static __init int event_trace_init(void)pr_warning ("tracing: Failed to allocate common fields" );for_each_event (call, __start_ftrace_events, __stop_ftrace_events) { -/* The linker may leave blanks */ -if (!call->name) -continue ; -if (call->class->raw_init) { - ret = call->class->raw_init (call); -if (ret <0 ) { -if (ret != -ENOSYS ) -pr_warning ("Could not initialize trace " -"point events/%s\n" , call->name); -continue ; - } - } - ret =event_create_dir (call, d_events, &ftrace_event_id_fops, +__trace_add_event_call (call,NULL , &ftrace_event_id_fops, &ftrace_enable_fops, &ftrace_event_filter_fops, &ftrace_event_format_fops); -if (!ret) -list_add (&call->list, &ftrace_events); }while (true) {
Signature · 1 line
1.6.3
[tip:perf/core] tracing: Remove open-coded __trace_add_event_call()
Commit-ID: 67ead0a6ceb001b4cb891d782e440f0e79493ba2 Gitweb: http://git.kernel.org/tip/67ead0a6ceb001b4cb891d782e440f0e79493ba2 Author: Li Zefan <[email protected]> AuthorDate: Mon, 24 May 2010 16:25:13 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Mon, 28 Jun 2010 17:12:55 -0400
tracing: Remove open-coded __trace_add_event_call()
Let trace_module_add_events() and event_trace_init() call __trace_add_event_call().
LKML-Reference: <[email protected]>
--- kernel/trace/trace_events.c | 70 +++++++++++------------------------------- 1 files changed, 19 insertions(+), 51 deletions(-)
kernel/trace/trace_events.c +19 -51
@@ -1009,11 +1009,17 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,return 0 ; } -static int __trace_add_event_call (struct ftrace_event_call *call) +static int +__trace_add_event_call (struct ftrace_event_call *call,struct module *mod, +const struct file_operations *id, +const struct file_operations *enable, +const struct file_operations *filter, +const struct file_operations *format) {struct dentry *d_events;int ret; +/* The linker may leave blanks */ if (!call->name)return -EINVAL ;
@@ -1021,8 +1027,8 @@ static int __trace_add_event_call(struct ftrace_event_call *call) ret = call->class->raw_init (call);if (ret <0 ) {if (ret != -ENOSYS ) -pr_warning ("Could not initialize trace " -"events/%s\n" , call->name); +pr_warning ("Could not initialize trace events/%s\n" , + call->name);return ret; } }
@@ -1031,11 +1037,10 @@ static int __trace_add_event_call(struct ftrace_event_call *call)if (!d_events)return -ENOENT ; - ret =event_create_dir (call, d_events, &ftrace_event_id_fops, - &ftrace_enable_fops, &ftrace_event_filter_fops, - &ftrace_event_format_fops); + ret =event_create_dir (call, d_events, id, enable, filter, format);if (!ret)list_add (&call->list, &ftrace_events); + call->mod = mod;return ret; }
@@ -1045,7 +1050,10 @@ int trace_add_event_call(struct ftrace_event_call *call) {int ret;mutex_lock (&event_mutex); - ret =__trace_add_event_call (call); + ret =__trace_add_event_call (call,NULL , &ftrace_event_id_fops, + &ftrace_enable_fops, + &ftrace_event_filter_fops, + &ftrace_event_format_fops);mutex_unlock (&event_mutex);return ret; }
@@ -1162,8 +1170,6 @@ static void trace_module_add_events(struct module *mod) {struct ftrace_module_file_ops *file_ops =NULL ;struct ftrace_event_call *call, *start, *end; -struct dentry *d_events; -int ret; start = mod->trace_events; end = mod->trace_events + mod->num_trace_events;
@@ -1171,38 +1177,14 @@ static void trace_module_add_events(struct module *mod)if (start == end)return ; - d_events =event_trace_events_dir (); -if (!d_events) + file_ops =trace_create_file_ops (mod); +if (!file_ops)return ;for_each_event (call, start, end) { -/* The linker may leave blanks */ -if (!call->name) -continue ; -if (call->class->raw_init) { - ret = call->class->raw_init (call); -if (ret <0 ) { -if (ret != -ENOSYS ) -pr_warning ("Could not initialize trace " -"point events/%s\n" , call->name); -continue ; - } - } -/* -* This module has events, create file ops for this module -* if not already done. -*/ -if (!file_ops) { - file_ops =trace_create_file_ops (mod); -if (!file_ops) -return ; - } - call->mod = mod; - ret =event_create_dir (call, d_events, +__trace_add_event_call (call, mod, &file_ops->id, &file_ops->enable, &file_ops->filter, &file_ops->format); -if (!ret) -list_add (&call->list, &ftrace_events); } }
@@ -1333,24 +1315,10 @@ static __init int event_trace_init(void)pr_warning ("tracing: Failed to allocate common fields" );for_each_event (call, __start_ftrace_events, __stop_ftrace_events) { -/* The linker may leave blanks */ -if (!call->name) -continue ; -if (call->class->raw_init) { - ret = call->class->raw_init (call); -if (ret <0 ) { -if (ret != -ENOSYS ) -pr_warning ("Could not initialize trace " -"point events/%s\n" , call->name); -continue ; - } - } - ret =event_create_dir (call, d_events, &ftrace_event_id_fops, +__trace_add_event_call (call,NULL , &ftrace_event_id_fops, &ftrace_enable_fops, &ftrace_event_filter_fops, &ftrace_event_format_fops); -if (!ret) -list_add (&call->list, &ftrace_events); }while (true) {
Steven Rostedt
maintainerQuoted 6 lines · Li Zefan
patch 1-2: reduce per trace event foot print
patch 3-5: convert some trace events toDEFINE_EVENTpatch 6-8: do some cleanups and thus shrink text size a bitSave ~5.7K in text and ~2.9K in data:
Quoted 7 lines
text data bss dec hex filename
7018612 2034376 7251132 16304120 f8c7f8 vmlinux.o.orig
7012847 2031440 7251132 16295419 f8a5fb vmlinux.oAnd save considerable memory allocated by
trace_define_event().-
Thanks Li!
I just pulled all but patch 5 in. Ted Tso said he'd take that one.
-- Steve