tools/testing/selftests/powerpc/pmu/lib.c

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

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/powerpc/pmu/lib.c
Extension
.c
Size
3163 bytes
Lines
189
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 (strstr(name, "libc")) {
			libc.first = start;
			libc.last = end - 1;
		} else if (strstr(name, "[vdso]")) {
			vdso.first = start;
			vdso.last = end - 1;
		}
	} while(1);

	fclose(f);

	return 0;
}

#define PARANOID_PATH	"/proc/sys/kernel/perf_event_paranoid"

bool require_paranoia_below(int level)
{
	int err;
	long current;

	err = read_long(PARANOID_PATH, &current, 10);
	if (err) {
		printf("Couldn't parse " PARANOID_PATH "?\n");
		return false;
	}

	return current < level;
}

Annotation

Implementation Notes