File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1440,7 +1440,10 @@ cdef inline inner_trace_callback(
14401440 # in tests it only seems to add overhead...
14411441 for i in range (size):
14421442 if data[i]:
1443+ # hash_bytecode is currently unused due to test issues on Windows with PyObject_Hash
1444+ # but we plan to fix those and enable it shortly
14431445 # block_hash = hash_bytecode(<PyObject *>py_bytes_obj, data, size)
1446+
14441447 # because we use Python functions like hash, we CANNOT mark this function as nogil
14451448 block_hash = hash (py_bytes_obj)
14461449 break
@@ -1460,6 +1463,9 @@ cdef inline inner_trace_callback(
14601463 has_time = True
14611464 ident = PyThread_get_thread_ident()
14621465 last_map = & (prof._c_last_time[ident])
1466+ # deref() is Cython's version of the -> accessor in C++. if we don't use deref then
1467+ # Cython thinks that when we index last_map,
1468+ # we want pointer indexing (which is not the case)
14631469 if deref(last_map).count(block_hash):
14641470 old = deref(last_map)[block_hash]
14651471 line_entries = & (prof._c_code_map[code_hash])
You can’t perform that action at this time.
0 commit comments