projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
[firefly-linux-kernel-4.4.55.git]
/
arch
/
s390
/
oprofile
/
hwsampler.c
diff --git
a/arch/s390/oprofile/hwsampler.c
b/arch/s390/oprofile/hwsampler.c
index f43c0e4282af5e46033b4a97349cf1fce4d88c26..9daee91e6c3fc20f8668a1797a8d388c102b62aa 100644
(file)
--- a/
arch/s390/oprofile/hwsampler.c
+++ b/
arch/s390/oprofile/hwsampler.c
@@
-22,6
+22,7
@@
#include <asm/irq.h>
#include "hwsampler.h"
#include <asm/irq.h>
#include "hwsampler.h"
+#include "op_counter.h"
#define MAX_NUM_SDB 511
#define MIN_NUM_SDB 1
#define MAX_NUM_SDB 511
#define MIN_NUM_SDB 1
@@
-896,6
+897,8
@@
static void add_samples_to_oprofile(unsigned int cpu, unsigned long *sdbt,
if (sample_data_ptr->P == 1) {
/* userspace sample */
unsigned int pid = sample_data_ptr->prim_asn;
if (sample_data_ptr->P == 1) {
/* userspace sample */
unsigned int pid = sample_data_ptr->prim_asn;
+ if (!counter_config.user)
+ goto skip_sample;
rcu_read_lock();
tsk = pid_task(find_vpid(pid), PIDTYPE_PID);
if (tsk)
rcu_read_lock();
tsk = pid_task(find_vpid(pid), PIDTYPE_PID);
if (tsk)
@@
-903,6
+906,8
@@
static void add_samples_to_oprofile(unsigned int cpu, unsigned long *sdbt,
rcu_read_unlock();
} else {
/* kernelspace sample */
rcu_read_unlock();
} else {
/* 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,
oprofile_add_ext_hw_sample(sample_data_ptr->ia, regs, 0,
!sample_data_ptr->P, tsk);
mutex_unlock(&hws_sem);
oprofile_add_ext_hw_sample(sample_data_ptr->ia, regs, 0,
!sample_data_ptr->P, tsk);
mutex_unlock(&hws_sem);
-
+ skip_sample:
sample_data_ptr++;
}
}
sample_data_ptr++;
}
}