diff options
author | Eric Anholt <eric@anholt.net> | 2008-03-28 15:15:26 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-03-28 15:15:54 -0700 |
commit | d50264fc7c4e0f80d9cc68dfdf322f68520a0f1e (patch) | |
tree | c604e2b6091ac72e92af7a76de458219f7c6f896 /src/reg_dumper | |
parent | 1450acd046d47e1739a3ffbd146c73ad2974a935 (diff) |
Add a "total" field to intel_idle output (set when any unit is busy).
Diffstat (limited to 'src/reg_dumper')
-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++; } |