Skip to content

Streamline the MAKE_WARM micro-op #138050

@markshannon

Description

@markshannon

The MAKE_WARM micro-op is inserted into every piece of jitted code and within the loop if there is one.
So it needs to be cheap.

Currently, it does this:

    current_executor->vm_data.warm = true;
    if (--tstate->interp->trace_run_counter == 0) {
        _Py_set_eval_breaker_bit(tstate, _PY_EVAL_JIT_INVALIDATE_COLD_BIT);
    }

we should move the logic for testing for "coldness" onto a less frequently taken path, perhaps in the jit itself, so _MAKE_WARM just needs to do the "warming":

    current_executor->vm_data.warm = true;

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagetopic-JITtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions