Skip to content

Commit

Permalink
Merge branch 'for-tip' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/rric/oprofile into perf/core
  • Loading branch information
Ingo Molnar committed Dec 20, 2011
2 parents 74eec26 + dd3c467 commit 124ba94
Show file tree
Hide file tree
Showing 5 changed files with 374 additions and 32 deletions.
2 changes: 2 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
timer: [X86] Force use of architectural NMI
timer mode (see also oprofile.timer
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
process, but there is a small probability of
Expand Down
7 changes: 6 additions & 1 deletion arch/s390/oprofile/hwsampler.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <asm/irq.h>

#include "hwsampler.h"
#include "op_counter.h"

#define MAX_NUM_SDB 511
#define MIN_NUM_SDB 1
Expand Down Expand Up @@ -896,21 +897,25 @@ 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 (!counter_config.user)
goto skip_sample;
rcu_read_lock();
tsk = pid_task(find_vpid(pid), PIDTYPE_PID);
if (tsk)
regs = task_pt_regs(tsk);
rcu_read_unlock();
} else {
/* kernelspace sample */
if (!counter_config.kernel)
goto skip_sample;
regs = task_pt_regs(current);
}

mutex_lock(&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++;
}
}
Expand Down
Loading

0 comments on commit 124ba94

Please sign in to comment.