Back to home page

LXR

 
 

    


0001 /**
0002  * @file arch/alpha/oprofile/op_impl.h
0003  *
0004  * @remark Copyright 2002 OProfile authors
0005  * @remark Read the file COPYING
0006  *
0007  * @author Richard Henderson <rth@twiddle.net>
0008  */
0009 
0010 #ifndef OP_IMPL_H
0011 #define OP_IMPL_H 1
0012 
0013 /* Per-counter configuration as set via oprofilefs.  */
0014 struct op_counter_config {
0015     unsigned long enabled;
0016     unsigned long event;
0017     unsigned long count;
0018     /* Dummies because I am too lazy to hack the userspace tools.  */
0019     unsigned long kernel;
0020     unsigned long user;
0021     unsigned long unit_mask;
0022 };
0023 
0024 /* System-wide configuration as set via oprofilefs.  */
0025 struct op_system_config {
0026     unsigned long enable_pal;
0027     unsigned long enable_kernel;
0028     unsigned long enable_user;
0029 };
0030 
0031 /* Cached values for the various performance monitoring registers.  */
0032 struct op_register_config {
0033     unsigned long enable;
0034     unsigned long mux_select;
0035     unsigned long proc_mode;
0036     unsigned long freq;
0037     unsigned long reset_values;
0038     unsigned long need_reset;
0039 };
0040 
0041 /* Per-architecture configuration and hooks.  */
0042 struct op_axp_model {
0043     void (*reg_setup) (struct op_register_config *,
0044                struct op_counter_config *,
0045                struct op_system_config *);
0046     void (*cpu_setup) (void *);
0047     void (*reset_ctr) (struct op_register_config *, unsigned long);
0048     void (*handle_interrupt) (unsigned long, struct pt_regs *,
0049                   struct op_counter_config *);
0050     char *cpu_type;
0051     unsigned char num_counters;
0052     unsigned char can_set_proc_mode;
0053 };
0054 
0055 #endif