op_impl.h 818 字节
Newer Older
1 2 3 4 5 6 7 8
#ifndef __OP_IMPL_H
#define __OP_IMPL_H

/* Per-counter configuration as set via oprofilefs.  */
struct op_counter_config {
	unsigned long enabled;
	unsigned long event;

9
	unsigned long count;
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

	/* Dummy values for userspace tool compliance */
	unsigned long kernel;
	unsigned long user;
	unsigned long unit_mask;
};

/* Per-architecture configury and hooks.  */
struct op_sh_model {
	void (*reg_setup)(struct op_counter_config *);
	int (*create_files)(struct super_block *sb, struct dentry *dir);
	void (*cpu_setup)(void *dummy);
	int (*init)(void);
	void (*exit)(void);
	void (*cpu_start)(void *args);
	void (*cpu_stop)(void *args);
	char *cpu_type;
	unsigned char num_counters;
};

/* arch/sh/oprofile/common.c */
extern void sh_backtrace(struct pt_regs * const regs, unsigned int depth);

#endif /* __OP_IMPL_H */