diff options
author | Robert Richter <robert.richter@amd.com> | 2010-10-04 19:09:36 (GMT) |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-10-12 15:25:06 (GMT) |
commit | 7df01d96b295e400167e78061b81d4c91630b12d (patch) | |
tree | 52782cc1d78c24030d627f719cdaa29846c42efb /drivers/oprofile/oprof.h | |
parent | 0361e02342f60b64a7075755d5851ed4e6f98c7d (diff) | |
download | linux-7df01d96b295e400167e78061b81d4c91630b12d.tar.xz |
oprofile: disable write access to oprofilefs while profiler is running
Oprofile counters are setup when profiling is disabled. Thus, writing
to oprofilefs has no immediate effect. Changes are updated only after
oprofile is reenabled.
To keep userland and kernel states synchronized, we now allow
configuration of oprofile only if profiling is disabled. In this case
it checks if the profiler is running and then disables write access to
oprofilefs by returning -EBUSY. The change should be backward
compatible with current oprofile userland daemon.
Acked-by: Maynard Johnson <maynardj@us.ibm.com>
Cc: William Cohen <wcohen@redhat.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'drivers/oprofile/oprof.h')
-rw-r--r-- | drivers/oprofile/oprof.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/oprofile/oprof.h b/drivers/oprofile/oprof.h index 47e12cb..177b73d 100644 --- a/drivers/oprofile/oprof.h +++ b/drivers/oprofile/oprof.h @@ -37,7 +37,7 @@ void oprofile_create_files(struct super_block *sb, struct dentry *root); int oprofile_timer_init(struct oprofile_operations *ops); void oprofile_timer_exit(void); -int oprofile_set_backtrace(unsigned long depth); +int oprofile_set_ulong(unsigned long *addr, unsigned long val); int oprofile_set_timeout(unsigned long time); #endif /* OPROF_H */ |