(self)
| 206 | return sum(x.get("execution_count", 0) for x in self._data.values()) |
| 207 | |
| 208 | def get_execution_counts(self) -> dict[str, tuple[int, int]]: |
| 209 | counts = {} |
| 210 | for name, opcode_stat in self._data.items(): |
| 211 | if "execution_count" in opcode_stat: |
| 212 | count = opcode_stat["execution_count"] |
| 213 | miss = 0 |
| 214 | if "specializable" not in opcode_stat: |
| 215 | miss = opcode_stat.get("specialization.miss", 0) |
| 216 | counts[name] = (count, miss) |
| 217 | return counts |
| 218 | |
| 219 | @functools.cache |
| 220 | def _get_pred_succ( |