aboutsummaryrefslogtreecommitdiffstats
path: root/trace-graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'trace-graph.h')
-rw-r--r--trace-graph.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/trace-graph.h b/trace-graph.h
index 92d9883..a0c5c54 100644
--- a/trace-graph.h
+++ b/trace-graph.h
@@ -27,6 +27,7 @@
27#include "trace-xml.h" 27#include "trace-xml.h"
28#include "task-list.h" 28#include "task-list.h"
29#include "rt-graph.h" 29#include "rt-graph.h"
30#include "trace-plot-task.h"
30 31
31struct graph_info; 32struct graph_info;
32 33
@@ -389,14 +390,26 @@ void graph_plot_cpus_update_callback(gboolean accept,
389 guint64 *selected_cpu_mask, 390 guint64 *selected_cpu_mask,
390 gpointer data); 391 gpointer data);
391 392
392/* task plot */ 393static inline void convert_nano(unsigned long long time, unsigned long *sec,
393void graph_plot_task(struct graph_info *ginfo, int pid, int pos); 394 unsigned long *usec)
394void graph_plot_task_update_callback(gboolean accept, 395{
395 gint *selected, 396 *sec = time / 1000000000ULL;
396 gint *non_select, 397 *usec = (time / 1000) % 1000000;
397 gpointer data); 398}
398void graph_plot_task_plotted(struct graph_info *ginfo, 399
399 gint **plotted); 400static inline gint hash_pid(gint val)
401{
402 /* idle always gets black */
403 if (!val)
404 return 0;
405 return trace_hash(val);
406}
407
408static inline int hash_cpu(int cpu)
409{
410 cpu = (cpu << 3) + cpu * 21;
411 return trace_hash(cpu);
412}
400 413
401 414
402#endif /* _TRACE_GRAPH_H */ 415#endif /* _TRACE_GRAPH_H */