tools/perf/tests/task-exit.c

Source file repositories/reference/linux-study-clean/tools/perf/tests/task-exit.c

File Facts

System
Linux kernel
Corpus path
tools/perf/tests/task-exit.c
Extension
.c
Size
3819 bytes
Lines
162
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 (retry_count++ > 1000) {
			pr_debug("Failed after retrying 1000 times\n");
			err = -1;
			goto out_delete_evlist;
		}

		goto retry;
	}

	if (nr_exit != 1) {
		pr_debug("received %d EXIT records\n", nr_exit);
		err = -1;
	}

out_delete_evlist:
	perf_cpu_map__put(cpus);
	perf_thread_map__put(threads);
	evlist__delete(evlist);
	return err;
}

struct test_case tests__task_exit[] = {
	TEST_CASE_EXCLUSIVE("Number of exit events of a simple workload", task_exit),
	{	.name = NULL, }
};
struct test_suite suite__task_exit = {
	.desc = "Number of exit events of a simple workload",
	.test_cases = tests__task_exit,
};

Annotation

Implementation Notes