summaryrefslogtreecommitdiff
path: root/btt/globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'btt/globals.h')
-rw-r--r--btt/globals.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/btt/globals.h b/btt/globals.h
index 5235ec6..22a1cb0 100644
--- a/btt/globals.h
+++ b/btt/globals.h
@@ -131,9 +131,9 @@ struct d_info {
struct list_head all_head, hash_head;
void *heads;
struct region_info regions;
- char *devmap;
+ char *devmap, dip_name[256];
void *q2q_handle, *seek_handle, *bno_dump_handle, *up_hist_handle;
- void *q2d_priv, *aqd_handle, *rstat_handle;
+ void *q2d_priv, *aqd_handle, *rstat_handle, *p_live_handle;
void *q2d_plat_handle, *q2c_plat_handle, *d2c_plat_handle;
FILE *q2d_ofp, *d2c_ofp, *q2c_ofp, *pit_fp;
struct avgs_info avgs;
@@ -164,6 +164,11 @@ struct io {
enum iop_type type;
};
+struct p_live_info {
+ unsigned long nlives;
+ double avg_live, avg_lull, p_live;
+};
+
/* bt_timeline.c */
extern char bt_timeline_version[], *devices, *exes, *input_name, *output_name;
@@ -174,7 +179,7 @@ extern double range_delta, plat_freq, last_t_seen;
extern FILE *rngs_ofp, *avgs_ofp, *xavgs_ofp, *iostat_ofp, *per_io_ofp;
extern FILE *msgs_ofp;
extern int verbose, done, time_bounded, output_all_data, seek_absolute;
-extern int easy_parse_avgs, ignore_remaps;
+extern int easy_parse_avgs, ignore_remaps, do_p_live;
extern unsigned int n_devs;
extern unsigned long n_traces;
extern struct list_head all_devs, all_procs;
@@ -192,7 +197,7 @@ void handle_args(int argc, char *argv[]);
void clean_args();
/* aqd.c */
-void *aqd_alloc(char *str);
+void *aqd_alloc(struct d_info *dip);
void aqd_free(void *info);
void aqd_clean(void);
void aqd_issue(void *info, double ts);
@@ -246,6 +251,7 @@ void latency_q2c(struct d_info *dip, __u64 tstamp, __u64 latency);
void add_file(FILE *fp, char *oname);
void add_buf(void *buf);
char *make_dev_hdr(char *pad, size_t len, struct d_info *dip, int add_parens);
+char *mkhandle(struct d_info *dip, char *str, size_t len);
FILE *my_fopen(const char *path, const char *mode);
int my_open(const char *path, int flags);
void dbg_ping(void);
@@ -269,17 +275,24 @@ void pip_foreach_out(void (*f)(struct p_info *, void *), void *arg);
void pip_exit(void);
/* bno_dump.c */
-void *bno_dump_alloc(__u32 device);
+void *bno_dump_alloc(struct d_info *dip);
void bno_dump_free(void *param);
void bno_dump_add(void *handle, struct io *iop);
void bno_dump_clean(void);
/* plat.c */
-void *plat_alloc(char *str);
+void *plat_alloc(struct d_info *dip, char *post);
void plat_free(void *info);
void plat_clean(void);
void plat_x2c(void *info, __u64 ts, __u64 latency);
+/* p_live.c */
+void *p_live_alloc(void);
+void p_live_free(void *p);
+void p_live_add(struct d_info *dip, __u64 dt, __u64 ct);
+void p_live_exit(void);
+struct p_live_info *p_live_get(struct d_info *dip, int base_y);
+
/* q2d.c */
void q2d_histo_add(void *priv, __u64 q2d);
void *q2d_alloc(void);
@@ -291,14 +304,14 @@ int q2d_ok(void *priv);
void q2d_acc(void *a1, void *a2);
/* rstats.c */
-void *rstat_alloc(char *bn);
+void *rstat_alloc(struct d_info *dip);
void rstat_free(void *ptr);
void rstat_add(void *ptr, double cur, unsigned long long nblks);
int rstat_init(void);
void rstat_exit(void);
/* seek.c */
-void *seeki_alloc(char *str);
+void *seeki_alloc(struct d_info *dip, char *post);
void seeki_free(void *param);
void seek_clean(void);
void seeki_add(void *handle, struct io *iop);
@@ -347,7 +360,7 @@ void trace_remap(struct io *a_iop);
void trace_requeue(struct io *r_iop);
/* unplug_hist.c */
-void *unplug_hist_alloc(__u32 device);
+void *unplug_hist_alloc(struct d_info *dip);
void unplug_hist_free(void *arg);
void unplug_hist_add(struct io *u_iop);