Linux Kernel
3.7.1
|
#include <linux/kernel_stat.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/smp.h>
#include <linux/errno.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/cpu.h>
#include <linux/semaphore.h>
#include <linux/oom.h>
#include <linux/oprofile.h>
#include <asm/facility.h>
#include <asm/cpu_mf.h>
#include <asm/irq.h>
#include "hwsampler.h"
#include "op_counter.h"
Go to the source code of this file.
Data Structures | |
struct | hws_execute_parms |
Macros | |
#define | MAX_NUM_SDB 511 |
#define | MIN_NUM_SDB 1 |
#define | ALERT_REQ_MASK 0x4000000000000000ul |
#define | BUFFER_FULL_MASK 0x8000000000000000ul |
Enumerations | |
enum | { HWS_INIT = 1, HWS_DEALLOCATED, HWS_STOPPED, HWS_STARTED, HWS_STOPPING } |
Functions | |
DECLARE_PER_CPU (struct hws_cpu_buffer, sampler_cpu_buffer) | |
DEFINE_PER_CPU (struct hws_cpu_buffer, sampler_cpu_buffer) | |
EXPORT_PER_CPU_SYMBOL (sampler_cpu_buffer) | |
int | hwsampler_deactivate (unsigned int cpu) |
int | hwsampler_activate (unsigned int cpu) |
int | hwsampler_allocate (unsigned long sdbt, unsigned long sdb) |
int | hwsampler_deallocate (void) |
unsigned long | hwsampler_query_min_interval (void) |
unsigned long | hwsampler_query_max_interval (void) |
unsigned long | hwsampler_get_sample_overflow_count (unsigned int cpu) |
int | hwsampler_setup (void) |
int | hwsampler_shutdown (void) |
int | hwsampler_start_all (unsigned long rate) |
int | hwsampler_stop_all (void) |
#define ALERT_REQ_MASK 0x4000000000000000ul |
Definition at line 29 of file hwsampler.c.
#define BUFFER_FULL_MASK 0x8000000000000000ul |
Definition at line 30 of file hwsampler.c.
#define MAX_NUM_SDB 511 |
Definition at line 26 of file hwsampler.c.
#define MIN_NUM_SDB 1 |
Definition at line 27 of file hwsampler.c.
anonymous enum |
Definition at line 50 of file hwsampler.c.
DECLARE_PER_CPU | ( | struct hws_cpu_buffer | , |
sampler_cpu_buffer | |||
) |
DEFINE_PER_CPU | ( | struct hws_cpu_buffer | , |
sampler_cpu_buffer | |||
) |
EXPORT_PER_CPU_SYMBOL | ( | sampler_cpu_buffer | ) |
hwsampler_activate() - activate/resume hardware sampling which was deactivated : specifies the CPU to be set active.
Returns 0 on success, !0 on failure.
Definition at line 648 of file hwsampler.c.
hwsampler_allocate() - allocate memory for the hardware sampler : number of SDBTs per online CPU (must be > 0) : number of SDBs per SDBT (minimum 1, maximum 511)
Returns 0 on success, !0 on failure.
Definition at line 945 of file hwsampler.c.
hwsampler_deactivate() - set hardware sampling temporarily inactive : specifies the CPU to be set inactive.
Returns 0 on success, !0 on failure.
Definition at line 601 of file hwsampler.c.
hwsampler_deallocate() - deallocate hardware sampler memory
Returns 0 on success, !0 on failure.
Definition at line 994 of file hwsampler.c.
Definition at line 1026 of file hwsampler.c.
Definition at line 1021 of file hwsampler.c.
Definition at line 1016 of file hwsampler.c.
Definition at line 1035 of file hwsampler.c.
Definition at line 1102 of file hwsampler.c.
hwsampler_start_all() - start hardware sampling on all online CPUs : specifies the used interval when samples are taken
Returns 0 on success, !0 on failure.
Definition at line 1143 of file hwsampler.c.
hwsampler_stop_all() - stop hardware sampling on all online CPUs
Returns 0 on success, !0 on failure.
Definition at line 1203 of file hwsampler.c.