tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c

Source file repositories/reference/linux-study-clean/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c
Extension
.c
Size
1850 bytes
Lines
93
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

if (val != expected[i % 2]) {
			bad_mmcr2 = true;
			actual = val;
		}

		i++;
	}

	ebb_global_disable();
	ebb_freeze_pmcs();

	dump_ebb_state();

	event_close(&event);

	FAIL_IF(ebb_state.stats.ebb_count == 0);

	if (bad_mmcr2)
		printf("Bad MMCR2 value seen is 0x%lx\n", actual);

	FAIL_IF(bad_mmcr2);

	return 0;
}

int main(void)
{
	return test_harness(cycles_with_mmcr2, "cycles_with_mmcr2");
}

Annotation

Implementation Notes