tools/perf/util/evswitch.c

Source file repositories/reference/linux-study-clean/tools/perf/util/evswitch.c

File Facts

System
Linux kernel
Corpus path
tools/perf/util/evswitch.c
Extension
.c
Size
1485 bytes
Lines
63
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 (evswitch->on == NULL) {
			evswitch__fprintf_enoent(fp, "on", evswitch->on_name);
			return -ENOENT;
		}
		evswitch->discarding = true;
	}

	if (evswitch->off_name) {
		evswitch->off = evlist__find_evsel_by_str(evlist, evswitch->off_name);
		if (evswitch->off == NULL) {
			evswitch__fprintf_enoent(fp, "off", evswitch->off_name);
			return -ENOENT;
		}
	}

	return 0;
}

Annotation

Implementation Notes