Commit 8a9b437
Guard deopt_stats_ with a mutex for free-threaded Python
Summary:
Deopt stats could be accessed from any thread running JIT-compiled code. Add a mutex guarded by `Py_GIL_DISABLED`.
Make the `deoptStat()` private and introduce `ifDeoptStat(.., func)` to use it for multi-threading.
Reviewed By: alexmalyshev
Differential Revision: D94702627
fbshipit-source-id: 957cc36a26d2fcdae5987b58e21b38f1ac473e1d1 parent af94c02 commit 8a9b437
3 files changed
Lines changed: 42 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
214 | 217 | | |
215 | 218 | | |
216 | 219 | | |
| |||
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
236 | 242 | | |
237 | 243 | | |
238 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
297 | 320 | | |
298 | 321 | | |
299 | 322 | | |
300 | 323 | | |
301 | 324 | | |
302 | 325 | | |
303 | 326 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | 327 | | |
311 | 328 | | |
312 | 329 | | |
| |||
444 | 461 | | |
445 | 462 | | |
446 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
447 | 474 | | |
448 | 475 | | |
449 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2332 | 2332 | | |
2333 | 2333 | | |
2334 | 2334 | | |
2335 | | - | |
2336 | | - | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
2340 | 2338 | | |
2341 | 2339 | | |
2342 | 2340 | | |
| |||
0 commit comments