Exemplo n.º 1
0
/*
 * XXX: We have 48-bit counters, so we're probably going to want something
 * more along the lines of oprofilefs_ullong_to_user().. Truncating to
 * unsigned long works fine for now though, as long as we don't attempt to
 * profile for too horribly long.
 */
static ssize_t sh7750_read_count(struct file *file, char __user *buf,
				 size_t count, loff_t *ppos)
{
	int counter = to_counter(file);
	u64 val = sh7750_read_counter(counter);

	return oprofilefs_ulong_to_user((unsigned long)val, buf, count, ppos);
}
Exemplo n.º 2
0
static ssize_t pointer_size_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
{
	return oprofilefs_ulong_to_user(sizeof(void *), buf, count, offset);
}
Exemplo n.º 3
0
static ssize_t depth_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
{
	return oprofilefs_ulong_to_user(oprofile_backtrace_depth, buf, count,
					offset);
}
Exemplo n.º 4
0
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(oprofile_time_slice),
					buf, count, offset);
}
Exemplo n.º 5
0
static ssize_t enable_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
{
	return oprofilefs_ulong_to_user(oprofile_started, buf, count, offset);
}
Exemplo n.º 6
0
static ssize_t ulong_read_file(struct file * file, char __user * buf, size_t count, loff_t * offset)
{
	unsigned long * val = file->private_data;
	return oprofilefs_ulong_to_user(*val, buf, count, offset);
}
Exemplo n.º 7
0
static ssize_t atomic_read_file(struct file * file, char __user * buf, size_t count, loff_t * offset)
{
	atomic_t * val = file->private_data;
	return oprofilefs_ulong_to_user(atomic_read(val), buf, count, offset);
}
Exemplo n.º 8
0
static ssize_t hwsampler_user_read(struct file *file, char __user *buf,
				   size_t count, loff_t *offset)
{
	return oprofilefs_ulong_to_user(counter_config.user,
					buf, count, offset);
}
Exemplo n.º 9
0
static ssize_t timer_enabled_read(struct file *file, char __user *buf,
				  size_t count, loff_t *offset)
{
	return oprofilefs_ulong_to_user(!hwsampler_enabled, buf, count, offset);
}
Exemplo n.º 10
0
static ssize_t hw_interval_read(struct file *file, char __user *buf,
				size_t count, loff_t *offset)
{
	return oprofilefs_ulong_to_user(oprofile_hw_interval, buf,
					count, offset);
}
ssize_t ca_css_bitness_read(struct file * file, 
				char __user * buf, size_t count, loff_t * offset)
{
	return oprofilefs_ulong_to_user(ca_css_bitness, buf, count, offset);
}
Exemplo n.º 12
0
static ssize_t enhanced_backtrace_read(struct file *file,
		char __user *buf, size_t count, loff_t *offset)
{
	return oprofilefs_ulong_to_user(oprofile_get_trace_thru_syscall(),
			buf, count, offset);
}
Exemplo n.º 13
0
static ssize_t atomic_read_file(struct file * file, char * buf, size_t count, loff_t * offset)
{
	atomic_t * aval = file->private_data;
	unsigned long val = atomic_read(aval);
	return oprofilefs_ulong_to_user(&val, buf, count, offset);
}
Exemplo n.º 14
0
static ssize_t ulong_read_file(struct file * file, char * buf, size_t count, loff_t * offset)
{
	return oprofilefs_ulong_to_user(file->private_data, buf, count, offset);
}