From: Julien Desfossez Date: Tue, 3 Apr 2012 15:04:32 +0000 (-0400) Subject: Revert "API sync babeltrace" X-Git-Tag: v0.2~43 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4adc827466f35fb285430634400259d8c55a5816;p=lttngtop.git Revert "API sync babeltrace" This reverts commit 3439955e838cd626b61ca36e37f80a104966a8fe. Babeltrace API returned to bt_ctf_event Signed-off-by: Julien Desfossez --- diff --git a/src/common.c b/src/common.c index d4f89f3..b18eafd 100644 --- a/src/common.c +++ b/src/common.c @@ -21,7 +21,7 @@ #include #include "common.h" -uint64_t get_cpu_id(const struct ctf_event_definition *event) +uint64_t get_cpu_id(const struct bt_ctf_event *event) { const struct definition *scope; uint64_t cpu_id; @@ -36,7 +36,7 @@ uint64_t get_cpu_id(const struct ctf_event_definition *event) return cpu_id; } -uint64_t get_context_tid(const struct ctf_event_definition *event) +uint64_t get_context_tid(const struct bt_ctf_event *event) { const struct definition *scope; uint64_t tid; @@ -52,7 +52,7 @@ uint64_t get_context_tid(const struct ctf_event_definition *event) return tid; } -uint64_t get_context_pid(const struct ctf_event_definition *event) +uint64_t get_context_pid(const struct bt_ctf_event *event) { const struct definition *scope; uint64_t pid; @@ -68,7 +68,7 @@ uint64_t get_context_pid(const struct ctf_event_definition *event) return pid; } -uint64_t get_context_ppid(const struct ctf_event_definition *event) +uint64_t get_context_ppid(const struct bt_ctf_event *event) { const struct definition *scope; uint64_t ppid; @@ -84,7 +84,7 @@ uint64_t get_context_ppid(const struct ctf_event_definition *event) return ppid; } -char *get_context_comm(const struct ctf_event_definition *event) +char *get_context_comm(const struct bt_ctf_event *event) { const struct definition *scope; char *comm; diff --git a/src/common.h b/src/common.h index 7f8dd07..21df7b1 100644 --- a/src/common.h +++ b/src/common.h @@ -57,10 +57,10 @@ struct perfcounter *get_perf_counter(const char *name, struct processtop *proc, void reset_global_counters(void); /* common field access functions */ -uint64_t get_cpu_id(const struct ctf_event_definition *event); -uint64_t get_context_tid(const struct ctf_event_definition *event); -uint64_t get_context_pid(const struct ctf_event_definition *event); -uint64_t get_context_ppid(const struct ctf_event_definition *event); -char *get_context_comm(const struct ctf_event_definition *event); +uint64_t get_cpu_id(const struct bt_ctf_event *event); +uint64_t get_context_tid(const struct bt_ctf_event *event); +uint64_t get_context_pid(const struct bt_ctf_event *event); +uint64_t get_context_ppid(const struct bt_ctf_event *event); +char *get_context_comm(const struct bt_ctf_event *event); #endif /* _COMMON_H */ diff --git a/src/cputop.c b/src/cputop.c index 8d4f03e..1b9a129 100644 --- a/src/cputop.c +++ b/src/cputop.c @@ -45,7 +45,7 @@ void update_cputop_data(unsigned long timestamp, int64_t cpu, int prev_pid, tmpcpu->task_start = timestamp; } -enum bt_cb_ret handle_sched_switch(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sched_switch(struct bt_ctf_event *call_data, void *private_data) { const struct definition *scope; @@ -99,7 +99,7 @@ error: return BT_CB_ERROR_STOP; } -enum bt_cb_ret handle_sched_process_free(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sched_process_free(struct bt_ctf_event *call_data, void *private_data) { const struct definition *scope; diff --git a/src/cputop.h b/src/cputop.h index 1d4c91d..f4ef105 100644 --- a/src/cputop.h +++ b/src/cputop.h @@ -23,10 +23,10 @@ #include #include -enum bt_cb_ret handle_sched_switch(struct ctf_event_definition *hook_data, +enum bt_cb_ret handle_sched_switch(struct bt_ctf_event *hook_data, void *call_data); -enum bt_cb_ret handle_sched_process_free(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sched_process_free(struct bt_ctf_event *call_data, void *private_data); #endif /* _LTTNGTOP_H */ diff --git a/src/iostreamtop.c b/src/iostreamtop.c index f455e78..7c1d611 100644 --- a/src/iostreamtop.c +++ b/src/iostreamtop.c @@ -253,7 +253,7 @@ struct file_history *create_file(struct file_history *history, char *file_name) return new_history; } -enum bt_cb_ret handle_exit_syscall(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_exit_syscall(struct bt_ctf_event *call_data, void *private_data) { const struct definition *scope; @@ -295,7 +295,7 @@ error: } -enum bt_cb_ret handle_sys_write(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sys_write(struct bt_ctf_event *call_data, void *private_data) { const struct definition *scope; @@ -334,7 +334,7 @@ error: return BT_CB_ERROR_STOP; } -enum bt_cb_ret handle_sys_read(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sys_read(struct bt_ctf_event *call_data, void *private_data) { struct processtop *tmp; @@ -374,7 +374,7 @@ error: } -enum bt_cb_ret handle_sys_open(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sys_open(struct bt_ctf_event *call_data, void *private_data) { @@ -415,7 +415,7 @@ error: } -enum bt_cb_ret handle_sys_close(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sys_close(struct bt_ctf_event *call_data, void *private_data) { const struct definition *scope; @@ -451,7 +451,7 @@ error: return BT_CB_ERROR_STOP; } -enum bt_cb_ret handle_statedump_file_descriptor(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_statedump_file_descriptor(struct bt_ctf_event *call_data, void *private_data) { const struct definition *scope; diff --git a/src/iostreamtop.h b/src/iostreamtop.h index c20f586..fe2e5db 100644 --- a/src/iostreamtop.h +++ b/src/iostreamtop.h @@ -28,17 +28,17 @@ struct files *get_file(struct processtop *proc, int fd); void show_table(GPtrArray *tab); void insert_file(struct processtop *proc, int fd); -enum bt_cb_ret handle_exit_syscall(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_exit_syscall(struct bt_ctf_event *call_data, void *private_data); -enum bt_cb_ret handle_sys_write(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sys_write(struct bt_ctf_event *call_data, void *private_data); -enum bt_cb_ret handle_sys_read(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sys_read(struct bt_ctf_event *call_data, void *private_data); -enum bt_cb_ret handle_sys_open(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sys_open(struct bt_ctf_event *call_data, void *private_data); -enum bt_cb_ret handle_sys_close(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_sys_close(struct bt_ctf_event *call_data, void *private_data); -enum bt_cb_ret handle_statedump_file_descriptor(struct ctf_event_definition *call_data, +enum bt_cb_ret handle_statedump_file_descriptor(struct bt_ctf_event *call_data, void *private_data); #endif /* _IOSTREAMTOP_H */ diff --git a/src/lttngtop.c b/src/lttngtop.c index d51302c..dc5711e 100644 --- a/src/lttngtop.c +++ b/src/lttngtop.c @@ -113,7 +113,7 @@ void *ncurses_display(void *p) * hook on each event to check the timestamp and refresh the display if * necessary */ -enum bt_cb_ret check_timestamp(struct ctf_event_definition *call_data, void *private_data) +enum bt_cb_ret check_timestamp(struct bt_ctf_event *call_data, void *private_data) { unsigned long timestamp; @@ -195,7 +195,7 @@ void update_perf_value(struct processtop *proc, struct cputime *cpu, } } -void extract_perf_counter_scope(const struct ctf_event_definition *event, +void extract_perf_counter_scope(const struct bt_ctf_event *event, const struct definition *scope, struct processtop *proc, struct cputime *cpu) @@ -225,7 +225,7 @@ end: return; } -void update_perf_counter(struct processtop *proc, const struct ctf_event_definition *event) +void update_perf_counter(struct processtop *proc, const struct bt_ctf_event *event) { struct cputime *cpu; const struct definition *scope; @@ -242,7 +242,7 @@ void update_perf_counter(struct processtop *proc, const struct ctf_event_definit extract_perf_counter_scope(event, scope, proc, cpu); } -enum bt_cb_ret fix_process_table(struct ctf_event_definition *call_data, +enum bt_cb_ret fix_process_table(struct bt_ctf_event *call_data, void *private_data) { int pid, tid, ppid; @@ -390,7 +390,7 @@ void iter_trace(struct bt_context *bt_ctx) { struct bt_ctf_iter *iter; struct bt_iter_pos begin_pos; - const struct ctf_event_definition *event; + const struct bt_ctf_event *event; int ret = 0; begin_pos.type = BT_SEEK_BEGIN;