Skip to content

Commit

Permalink
update Tools/scripts/summarize_stats.py to use _opcode_metadata inste…
Browse files Browse the repository at this point in the history
…ad of opcode for _specialized_instructions
  • Loading branch information
iritkatriel committed Jul 18, 2023
1 parent d525c53 commit 5e1c4a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tools/scripts/summarize_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import json
import os.path
import opcode
import _opcode_metadata
from datetime import date
import itertools
import sys
Expand All @@ -17,7 +18,7 @@
DEFAULT_DIR = "/tmp/py_stats/"

#Create list of all instruction names
specialized = iter(opcode._specialized_instructions)
specialized = iter(_opcode_metadata._specialized_instructions)
opname = ["<0>"]
for name in opcode.opname[1:]:
if name.startswith("<"):
Expand Down Expand Up @@ -244,7 +245,7 @@ def categorized_counts(opcode_stats):
specialized = 0
not_specialized = 0
specialized_instructions = {
op for op in opcode._specialized_instructions
op for op in _opcode_metadata._specialized_instructions
if "__" not in op}
for i, opcode_stat in enumerate(opcode_stats):
if "execution_count" not in opcode_stat:
Expand Down

0 comments on commit 5e1c4a4

Please sign in to comment.