Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Python/ceval.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ maybe_lltrace_resume_frame(_PyInterpreterFrame *frame, PyObject *globals)
// Can also be controlled by environment variable
char *python_lltrace = Py_GETENV("PYTHON_LLTRACE");
if (python_lltrace != NULL && *python_lltrace >= '0') {
lltrace = *python_lltrace - '0'; // TODO: Parse an int and all that
lltrace = atoi(python_lltrace);
}
}
if (lltrace >= 5) {
Expand Down
6 changes: 3 additions & 3 deletions Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ _PyJit_translate_single_bytecode_to_trace(
char *python_lltrace = Py_GETENV("PYTHON_LLTRACE");
int lltrace = 0;
if (python_lltrace != NULL && *python_lltrace >= '0') {
lltrace = *python_lltrace - '0'; // TODO: Parse an int and all that
lltrace = atoi(python_lltrace);
}
#endif
_PyThreadStateImpl *_tstate = (_PyThreadStateImpl *)tstate;
Expand Down Expand Up @@ -1033,7 +1033,7 @@ _PyJit_TryInitializeTracing(
char *python_lltrace = Py_GETENV("PYTHON_LLTRACE");
int lltrace = 0;
if (python_lltrace != NULL && *python_lltrace >= '0') {
lltrace = *python_lltrace - '0'; // TODO: Parse an int and all that
lltrace = atoi(python_lltrace);
}
DPRINTF(2,
"Tracing %s (%s:%d) at byte offset %d at chain depth %d\n",
Expand Down Expand Up @@ -1433,7 +1433,7 @@ make_executor_from_uops(_PyThreadStateImpl *tstate, _PyUOpInstruction *buffer, i
char *python_lltrace = Py_GETENV("PYTHON_LLTRACE");
int lltrace = 0;
if (python_lltrace != NULL && *python_lltrace >= '0') {
lltrace = *python_lltrace - '0'; // TODO: Parse an int and all that
lltrace = atoi(python_lltrace);
}
if (lltrace >= 2) {
printf("Optimized trace (length %d):\n", length);
Expand Down
2 changes: 1 addition & 1 deletion Python/optimizer_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
char *uop_debug = Py_GETENV(DEBUG_ENV);
int lltrace = 0;
if (uop_debug != NULL && *uop_debug >= '0') {
lltrace = *uop_debug - '0'; // TODO: Parse an int and all that
lltrace = atoi(uop_debug);
}
return lltrace;
}
Expand Down
2 changes: 1 addition & 1 deletion Python/optimizer_symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static inline int get_lltrace(void) {
char *uop_debug = Py_GETENV("PYTHON_OPT_DEBUG");
int lltrace = 0;
if (uop_debug != NULL && *uop_debug >= '0') {
lltrace = *uop_debug - '0'; // TODO: Parse an int and all that
lltrace = atoi(uop_debug);
}
return lltrace;
}
Expand Down
Loading