(opcode: str)
| 880 | |
| 881 | def specialization_section() -> Section: |
| 882 | def calc_specialization_table(opcode: str) -> RowCalculator: |
| 883 | def calc(stats: Stats) -> Rows: |
| 884 | DOCS = { |
| 885 | "deferred": 'Lists the number of "deferred" (i.e. not specialized) instructions executed.', |
| 886 | "hit": "Specialized instructions that complete.", |
| 887 | "miss": "Specialized instructions that deopt.", |
| 888 | "deopt": "Specialized instructions that deopt.", |
| 889 | } |
| 890 | |
| 891 | opcode_stats = stats.get_opcode_stats("opcode") |
| 892 | total = opcode_stats.get_specialization_total(opcode) |
| 893 | specialization_counts = opcode_stats.get_specialization_counts(opcode) |
| 894 | |
| 895 | return [ |
| 896 | ( |
| 897 | Doc(label, DOCS[label]), |
| 898 | Count(count), |
| 899 | Ratio(count, total), |
| 900 | ) |
| 901 | for label, count in specialization_counts.items() |
| 902 | ] |
| 903 | |
| 904 | return calc |
| 905 | |
| 906 | def calc_specialization_success_failure_table(name: str) -> RowCalculator: |
| 907 | def calc(stats: Stats) -> Rows: |
no outgoing calls
no test coverage detected
searching dependent graphs…