Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158228
b: refs/heads/master
c: afe1b50
h: refs/heads/master
v: v3
  • Loading branch information
Robert Richter committed Jul 20, 2009
1 parent 9aab8c5 commit 33bdb1d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2051cade7ccbe45a8bf8b7809d56b23d6d75ad03
refs/heads/master: afe1b50fe6aa56093e9234bdc08779e9fe20b5bf
9 changes: 4 additions & 5 deletions trunk/drivers/oprofile/oprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ static DEFINE_MUTEX(start_mutex);

static void switch_worker(struct work_struct *work);
static DECLARE_DELAYED_WORK(switch_work, switch_worker);
unsigned long timeout_jiffies;
#define MULTIPLEXING_TIMER_DEFAULT 1
#define TIME_SLICE_DEFAULT 1

#endif

Expand Down Expand Up @@ -102,7 +101,7 @@ int oprofile_setup(void)

static void start_switch_worker(void)
{
schedule_delayed_work(&switch_work, timeout_jiffies);
schedule_delayed_work(&switch_work, oprofile_time_slice);
}

static void switch_worker(struct work_struct *work)
Expand Down Expand Up @@ -216,7 +215,7 @@ int oprofile_set_timeout(unsigned long val_msec)
goto out;
}

timeout_jiffies = time_slice;
oprofile_time_slice = time_slice;

out:
mutex_unlock(&start_mutex);
Expand Down Expand Up @@ -253,7 +252,7 @@ int oprofile_set_backtrace(unsigned long val)

static void __init oprofile_multiplexing_init(void)
{
timeout_jiffies = msecs_to_jiffies(MULTIPLEXING_TIMER_DEFAULT);
oprofile_time_slice = msecs_to_jiffies(TIME_SLICE_DEFAULT);
}

#endif
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/oprofile/oprof.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ struct oprofile_operations;
extern unsigned long oprofile_buffer_size;
extern unsigned long oprofile_cpu_buffer_size;
extern unsigned long oprofile_buffer_watershed;
extern unsigned long oprofile_time_slice;

extern struct oprofile_operations oprofile_ops;
extern unsigned long oprofile_started;
extern unsigned long oprofile_backtrace_depth;
extern unsigned long timeout_jiffies;

struct super_block;
struct dentry;
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/oprofile/oprofile_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
unsigned long oprofile_buffer_size;
unsigned long oprofile_cpu_buffer_size;
unsigned long oprofile_buffer_watershed;
unsigned long oprofile_time_slice;

#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX

static ssize_t timeout_read(struct file *file, char __user *buf,
size_t count, loff_t *offset)
{
return oprofilefs_ulong_to_user(jiffies_to_msecs(timeout_jiffies),
buf, count, offset);
return oprofilefs_ulong_to_user(jiffies_to_msecs(oprofile_time_slice),
buf, count, offset);
}


Expand Down

0 comments on commit 33bdb1d

Please sign in to comment.