18c2ecf20Sopenharmony_ci/** 28c2ecf20Sopenharmony_ci * @file oprof.h 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * @remark Copyright 2002 OProfile authors 58c2ecf20Sopenharmony_ci * @remark Read the file COPYING 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * @author John Levon <levon@movementarian.org> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef OPROF_H 118c2ecf20Sopenharmony_ci#define OPROF_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciint oprofile_setup(void); 148c2ecf20Sopenharmony_civoid oprofile_shutdown(void); 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciint oprofilefs_register(void); 178c2ecf20Sopenharmony_civoid oprofilefs_unregister(void); 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciint oprofile_start(void); 208c2ecf20Sopenharmony_civoid oprofile_stop(void); 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cistruct oprofile_operations; 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciextern unsigned long oprofile_buffer_size; 258c2ecf20Sopenharmony_ciextern unsigned long oprofile_cpu_buffer_size; 268c2ecf20Sopenharmony_ciextern unsigned long oprofile_buffer_watershed; 278c2ecf20Sopenharmony_ciextern unsigned long oprofile_time_slice; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ciextern struct oprofile_operations oprofile_ops; 308c2ecf20Sopenharmony_ciextern unsigned long oprofile_started; 318c2ecf20Sopenharmony_ciextern unsigned long oprofile_backtrace_depth; 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_cistruct dentry; 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_civoid oprofile_create_files(struct dentry *root); 368c2ecf20Sopenharmony_ciint oprofile_timer_init(struct oprofile_operations *ops); 378c2ecf20Sopenharmony_ci#ifdef CONFIG_OPROFILE_NMI_TIMER 388c2ecf20Sopenharmony_ciint op_nmi_timer_init(struct oprofile_operations *ops); 398c2ecf20Sopenharmony_ci#else 408c2ecf20Sopenharmony_cistatic inline int op_nmi_timer_init(struct oprofile_operations *ops) 418c2ecf20Sopenharmony_ci{ 428c2ecf20Sopenharmony_ci return -ENODEV; 438c2ecf20Sopenharmony_ci} 448c2ecf20Sopenharmony_ci#endif 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ciint oprofile_set_ulong(unsigned long *addr, unsigned long val); 488c2ecf20Sopenharmony_ciint oprofile_set_timeout(unsigned long time); 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#endif /* OPROF_H */ 51