[PATCH openEuler-1.0-LTS v4 126/292] Intel: perf/x86/intel/uncore: Factor out box ref/unref functions