Commit 124ba940 authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'for-tip' of...

Merge branch 'for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/core
parents 74eec26f dd3c4670
...@@ -1888,6 +1888,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ...@@ -1888,6 +1888,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
timer: [X86] Force use of architectural NMI timer: [X86] Force use of architectural NMI
timer mode (see also oprofile.timer timer mode (see also oprofile.timer
for generic hr timer mode) for generic hr timer mode)
[s390] Force legacy basic mode sampling
(report cpu_type "timer")
oops=panic Always panic on oopses. Default is to just kill the oops=panic Always panic on oopses. Default is to just kill the
process, but there is a small probability of process, but there is a small probability of
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <asm/irq.h> #include <asm/irq.h>
#include "hwsampler.h" #include "hwsampler.h"
#include "op_counter.h"
#define MAX_NUM_SDB 511 #define MAX_NUM_SDB 511
#define MIN_NUM_SDB 1 #define MIN_NUM_SDB 1
...@@ -896,6 +897,8 @@ static void add_samples_to_oprofile(unsigned int cpu, unsigned long *sdbt, ...@@ -896,6 +897,8 @@ static void add_samples_to_oprofile(unsigned int cpu, unsigned long *sdbt,
if (sample_data_ptr->P == 1) { if (sample_data_ptr->P == 1) {
/* userspace sample */ /* userspace sample */
unsigned int pid = sample_data_ptr->prim_asn; unsigned int pid = sample_data_ptr->prim_asn;
if (!counter_config.user)
goto skip_sample;
rcu_read_lock(); rcu_read_lock();
tsk = pid_task(find_vpid(pid), PIDTYPE_PID); tsk = pid_task(find_vpid(pid), PIDTYPE_PID);
if (tsk) if (tsk)
...@@ -903,6 +906,8 @@ static void add_samples_to_oprofile(unsigned int cpu, unsigned long *sdbt, ...@@ -903,6 +906,8 @@ static void add_samples_to_oprofile(unsigned int cpu, unsigned long *sdbt,
rcu_read_unlock(); rcu_read_unlock();
} else { } else {
/* kernelspace sample */ /* kernelspace sample */
if (!counter_config.kernel)
goto skip_sample;
regs = task_pt_regs(current); regs = task_pt_regs(current);
} }
...@@ -910,7 +915,7 @@ static void add_samples_to_oprofile(unsigned int cpu, unsigned long *sdbt, ...@@ -910,7 +915,7 @@ static void add_samples_to_oprofile(unsigned int cpu, unsigned long *sdbt,
oprofile_add_ext_hw_sample(sample_data_ptr->ia, regs, 0, oprofile_add_ext_hw_sample(sample_data_ptr->ia, regs, 0,
!sample_data_ptr->P, tsk); !sample_data_ptr->P, tsk);
mutex_unlock(&hws_sem); mutex_unlock(&hws_sem);
skip_sample:
sample_data_ptr++; sample_data_ptr++;
} }
} }
......
This diff is collapsed.
/**
* arch/s390/oprofile/op_counter.h
*
* Copyright (C) 2011 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Author(s): Andreas Krebbel (krebbel@linux.vnet.ibm.com)
*
* @remark Copyright 2011 OProfile authors
*/
#ifndef OP_COUNTER_H
#define OP_COUNTER_H
struct op_counter_config {
/* `enabled' maps to the hwsampler_file variable. */
/* `count' maps to the oprofile_hw_interval variable. */
/* `event' and `unit_mask' are unused. */
unsigned long kernel;
unsigned long user;
};
extern struct op_counter_config counter_config;
#endif /* OP_COUNTER_H */
...@@ -35,7 +35,6 @@ struct dentry; ...@@ -35,7 +35,6 @@ struct dentry;
void oprofile_create_files(struct super_block *sb, struct dentry *root); void oprofile_create_files(struct super_block *sb, struct dentry *root);
int oprofile_timer_init(struct oprofile_operations *ops); int oprofile_timer_init(struct oprofile_operations *ops);
void oprofile_timer_exit(void);
#ifdef CONFIG_OPROFILE_NMI_TIMER #ifdef CONFIG_OPROFILE_NMI_TIMER
int op_nmi_timer_init(struct oprofile_operations *ops); int op_nmi_timer_init(struct oprofile_operations *ops);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment