PMC_START(3)
β¨ NAME β¨
Okay so this is PMC_START(3), straight outta the Library Functions Manual, and the main characters are pmc_start, pmc_stop β they start and stop a PMC. Periodt. π
πΈ LIBRARY πΈ
Performance Counters Library (libpmc, -lpmc) β that's where these babies live.
π¦ SYNOPSIS π¦
#include <pmc.h>
int
pmc_start(pmc_id_t pmc);
int
pmc_stop(pmc_id_t pmc);
π DESCRIPTION π
Okay so these functions are literally the on/off switch for a PMC.
pmc_start() starts the PMC specified by argument pmc. And here's the cute little detail: if the specified PMC has process scope and has not been attached to any targets, it will be attached to the current process. It's giving "you're mine now" energy. π«Ά
pmc_stop() stops the PMC specified by argument pmc. That's it. That's the tea. β
π₯ RETURN VALUES π₯
If it works, you get 0 back. If it doesn't, you get -1, and the global variable errno is set to indicate the error. So check errno, bestie β it's literally telling you what happened. π
π ERRORS π
A call to these functions may fail with the following errors:
EDOOFUSβpmc_start()specified a PMC that requires a log file and no log file was configured. Iconic error name, ngl.EINVALβ the specified PMC is in the process of being deleted. Mid-deletion, not cute.EINVALβpmc_stop()specified a PMC that was never started. You can't stop what never started, bestie.ENXIOβ the specified PMC had system scope and its associated CPU was disabled or absent. Ghosted by the CPU. π
π SEE ALSO π
Go read those next, iykyk. π
This page is from Debian and is dated September 22, 2008. Bye bestie, go start and stop those PMCs with main character energy πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2007-2008 Joseph Koshy. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms