[PATCH] perf/core: fix corner case in perf_rotate_context()