oprofile: protect from not being in an IRQ context
authorPhil Carmody <ext-phil.2.carmody@nokia.com>
Wed, 28 Apr 2010 17:09:16 +0000 (12:09 -0500)
committerRobert Richter <robert.richter@amd.com>
Mon, 3 May 2010 21:02:39 +0000 (23:02 +0200)
commit9414e99672271adcc661f3c160a30b374179b92f
treeda2052d48666552400b3204f15bb18b58156065f
parentb971f06187d83b5c03d2b597cccdfef421c0ca91
oprofile: protect from not being in an IRQ context

http://lkml.org/lkml/2010/4/27/285

Protect against dereferencing regs when it's NULL, and
force a magic number into pc to prevent too deep processing.
This approach permits the dropped samples to be tallied as
invalid Instruction Pointer events.

e.g. output from about 15mins at 10kHz sample rate:
Nr. samples received: 2565380
Nr. samples lost invalid pc: 4

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
drivers/oprofile/cpu_buffer.c