Skip to content

Commit

Permalink
Don't gather stats unless configure flag is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
markshannon committed Feb 3, 2022
1 parent a60b843 commit 7d601e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@ specialize_class_load_method(PyObject *owner, _Py_CODEUNIT *instr, PyObject *nam
cache2->obj = descr;
*instr = _Py_MAKECODEUNIT(LOAD_METHOD_CLASS, _Py_OPARG(*instr));
return 0;
#ifdef Py_STATS
case ABSENT:
if (_PyType_Lookup(Py_TYPE(owner), name) != NULL) {
SPECIALIZATION_FAIL(LOAD_METHOD, SPEC_FAIL_METACLASS_ATTRIBUTE);
Expand All @@ -987,6 +988,7 @@ specialize_class_load_method(PyObject *owner, _Py_CODEUNIT *instr, PyObject *nam
SPECIALIZATION_FAIL(LOAD_METHOD, SPEC_FAIL_EXPECTED_ERROR);
}
return -1;
#endif
default:
SPECIALIZATION_FAIL(LOAD_METHOD, load_method_fail_kind(kind));
return -1;
Expand Down

0 comments on commit 7d601e9

Please sign in to comment.