File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -7459,14 +7459,30 @@ _Py_GetDXProfile(PyObject *self, PyObject *args)
7459
7459
int i ;
7460
7460
PyObject * l = PyList_New (257 );
7461
7461
if (l == NULL ) return NULL ;
7462
- for (i = 0 ; i < 257 ; i ++ ) {
7462
+ for (i = 0 ; i < 256 ; i ++ ) {
7463
7463
PyObject * x = getarray (_py_stats .opcode_stats [i ].pair_count );
7464
7464
if (x == NULL ) {
7465
7465
Py_DECREF (l );
7466
7466
return NULL ;
7467
7467
}
7468
7468
PyList_SET_ITEM (l , i , x );
7469
7469
}
7470
+ PyObject * counts = PyList_New (256 );
7471
+ if (counts == NULL ) {
7472
+ Py_DECREF (l );
7473
+ return NULL ;
7474
+ }
7475
+ for (i = 0 ; i < 256 ; i ++ ) {
7476
+ PyObject * x = PyLong_FromUnsignedLongLong (
7477
+ _py_stats .opcode_stats [i ].execution_count );
7478
+ if (x == NULL ) {
7479
+ Py_DECREF (counts );
7480
+ Py_DECREF (l );
7481
+ return NULL ;
7482
+ }
7483
+ PyList_SET_ITEM (counts , i , x );
7484
+ }
7485
+ PyList_SET_ITEM (l , 256 , counts );
7470
7486
return l ;
7471
7487
}
7472
7488
You can’t perform that action at this time.
0 commit comments