diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2010-09-17 20:24:23 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-09-17 20:24:23 -0400 |
| commit | cc00bd8493547dd9a6f03f42647156a57bbb2cc4 (patch) | |
| tree | 003292ef0e5bcad0d515bda7242b755ba1183ac7 | |
| parent | 16a0cfc7747b20b9f9825a7de6fdea34a3548e32 (diff) | |
trace-graph: Give a better CPU color difference in task plots
The CPU color for task plots is a bit close at the lower end. Add
some salt to the algorithm to spread it out a bit more.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | trace-plot-task.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/trace-plot-task.c b/trace-plot-task.c index 6ba4fb1..794b889 100644 --- a/trace-plot-task.c +++ b/trace-plot-task.c | |||
| @@ -55,7 +55,9 @@ static gint hash_pid(gint val) | |||
| 55 | 55 | ||
| 56 | static int hash_cpu(int cpu) | 56 | static int hash_cpu(int cpu) |
| 57 | { | 57 | { |
| 58 | return trace_hash(cpu + 124); | 58 | cpu = (cpu << 3) + cpu * 21; |
| 59 | |||
| 60 | return trace_hash(cpu); | ||
| 59 | } | 61 | } |
| 60 | 62 | ||
| 61 | static gboolean is_running(struct graph_info *ginfo, struct record *record) | 63 | static gboolean is_running(struct graph_info *ginfo, struct record *record) |
