diff options
author | Eric Anholt <eric@anholt.net> | 2008-03-28 15:15:26 -0700 |
---|---|---|
committer | root <root@debian-hp.(none)> | 2008-03-30 21:44:50 +0800 |
commit | 46b771b2530f80218bc1ac8df10685ac13350c0f (patch) | |
tree | 02575c3f42946137b7ac11e157ccf1ea3d1c382e /src | |
parent | ca694544247695864493ce67613f07bb19d272fd (diff) |
Add a "total" field to intel_idle output (set when any unit is busy).
(cherry picked from commit d50264fc7c4e0f80d9cc68dfdf322f68520a0f1e)
Diffstat (limited to 'src')
-rw-r--r-- | src/reg_dumper/idle.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/reg_dumper/idle.c b/src/reg_dumper/idle.c index 0077bf45..bc9dbb71 100644 --- a/src/reg_dumper/idle.c +++ b/src/reg_dumper/idle.c @@ -54,22 +54,24 @@ struct idle_flags i965_idle_flags[] = { {I965_MAP_FILTER_DONE, "map filter"}, {I965_MAP_L2_IDLE, "map L2"}, {I965_CP_DONE, "CP"}, + {0, "total"}, {0, "other"}, }; -/* Fills in the "other" field's idle flags */ +/* Fills in the "other" and "total" fields' idle flags */ static void setup_other_flags(struct idle_flags *idle_flags, int idle_flag_count) { - uint32_t other_idle_flags; + uint32_t other_idle_flags, total_idle_flags = 0; int i; other_idle_flags = ~(I965_RING_0_ENABLE); - for (i = 0; i < idle_flag_count - 1; i++) { + for (i = 0; i < idle_flag_count - 2; i++) { other_idle_flags &= ~idle_flags[i].instdone_flag; + total_idle_flags |= idle_flags[i].instdone_flag; } + idle_flags[i - 1].instdone_flag = total_idle_flags; idle_flags[i].instdone_flag = other_idle_flags; - } int main(int argc, char **argv) @@ -138,7 +140,8 @@ int main(int argc, char **argv) uint32_t instdone = INREG(INST_DONE_I965); for (j = 0; j < idle_flag_count; j++) { - if ((instdone & idle_flags[j].instdone_flag) == 0) + if ((instdone & idle_flags[j].instdone_flag) != + idle_flags[j].instdone_flag) idle_flags[j].count++; } |