pmc.h Reference

Declared in
pmc.h

Overview

Included Headers

  • <stdint.h>

  • <kern/queue.h>

  • <mach/boolean.h>

  • <mach/mach_time.h>

  • <mach/mach_types.h>

  • <libkern/version.h>

Functions

See the Overview section above for header-level documentation.

Callbacks

See the Overview section above for header-level documentation.

Data Types

See the Overview section above for header-level documentation.

pmc_reservation

In-kernel object to track an individual reservation

struct pmc_reservation {
   pmc_t pmc; // Pointer to in-kernel pmc which is reserved
   pmc_config_t config; // counter configuration
   // stored counter value
   uint64_t value;
   // TODO: Add mach-port (user-export object?)
   volatile uint32_t flags __attribute__((aligned(4)));
   volatile pmc_state_t state __attribute__((aligned(4)));
   volatile uint32_t active_last_context_in __attribute__((aligned(4)));
   union {
      task_t task; // not retained
      thread_t thread; // not retained
   };
   queue_chain_t link;
};
Discussion

struct pmc_reservation