From: graalfs@linux.vnet.ibm.com
To: robert.richter@amd.com
Cc: mingo@elte.hu, oprofile-list@lists.sf.net,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
borntraeger@de.ibm.com, schwidefsky@de.ibm.com,
heiko.carstens@de.ibm.com,
Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
Maran Pakkirisamy <maranp@linux.vnet.ibm.com>
Subject: [patch 4/4] Handle memory unmap while hardware sampling is running
Date: Mon, 20 Dec 2010 14:05:45 +0100 [thread overview]
Message-ID: <20101220130629.974963910@linux.vnet.ibm.com> (raw)
In-Reply-To: 20101220130541.446049933@linux.vnet.ibm.com
[-- Attachment #1: handle_munmap.patch --]
[-- Type: text/plain, Size: 1978 bytes --]
From: graalfs@linux.vnet.ibm.com
During memory unmap hardware sampling is deactivated.
After all samples have been collected hardware sampling is reactivated again.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Maran Pakkirisamy <maranp@linux.vnet.ibm.com>
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
---
arch/s390/oprofile/hwsampler_files.c | 2 +-
drivers/oprofile/buffer_sync.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/oprofile/buffer_sync.c
===================================================================
--- linux-2.6.orig/drivers/oprofile/buffer_sync.c
+++ linux-2.6/drivers/oprofile/buffer_sync.c
@@ -32,6 +32,11 @@
#include <linux/sched.h>
#include <linux/gfp.h>
+#ifdef CONFIG_OPROFILE_HWSAMPLING_MODE
+#include <asm/hwsampler.h>
+extern unsigned long oprofile_hwsampler;
+#endif
+
#include "oprofile_stats.h"
#include "event_buffer.h"
#include "cpu_buffer.h"
@@ -513,6 +518,10 @@ void sync_buffer(int cpu)
mutex_lock(&buffer_mutex);
+#ifdef CONFIG_OPROFILE_HWSAMPLING_MODE
+ if (oprofile_hwsampler)
+ hwsampler_deactivate(cpu);
+#endif
add_cpu_switch(cpu);
op_cpu_buffer_reset(cpu);
@@ -569,6 +578,10 @@ void sync_buffer(int cpu)
mark_done(cpu);
+#ifdef CONFIG_OPROFILE_HWSAMPLING_MODE
+ if (oprofile_hwsampler)
+ hwsampler_activate(cpu);
+#endif
mutex_unlock(&buffer_mutex);
}
Index: linux-2.6/arch/s390/oprofile/hwsampler_files.c
===================================================================
--- linux-2.6.orig/arch/s390/oprofile/hwsampler_files.c
+++ linux-2.6/arch/s390/oprofile/hwsampler_files.c
@@ -22,7 +22,7 @@ unsigned long oprofile_max_interval;
static unsigned long oprofile_sdbt_blocks = DEFAULT_SDBT_BLOCKS;
static unsigned long oprofile_sdb_blocks = DEFAULT_SDB_BLOCKS;
-static unsigned long oprofile_hwsampler;
+unsigned long oprofile_hwsampler;
static int oprofile_hwsampler_start(void)
{
next prev parent reply other threads:[~2010-12-20 13:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 13:05 [patch 0/4] OProfile support for System z's hardware sampling graalfs
2010-12-20 13:05 ` [patch 1/4] This patch adds support for hardware based sampling on System z processors (models z10 and up) graalfs
2011-01-03 17:06 ` Robert Richter
2011-01-19 16:54 ` Heinz Graalfs
2010-12-20 13:05 ` [patch 2/4] This patch enhances OProfile to support System zs hardware sampling feature graalfs
2011-01-03 19:02 ` Robert Richter
2011-01-19 16:55 ` Heinz Graalfs
2010-12-20 13:05 ` [patch 3/4] This patch introduces a new oprofile sample add function (oprofile_add_ext_hw_sample) graalfs
2011-01-04 15:34 ` Robert Richter
2011-01-07 16:31 ` Heinz Graalfs
2011-01-19 16:56 ` Heinz Graalfs
2010-12-20 13:05 ` graalfs [this message]
2011-01-03 20:39 ` [patch 4/4] Handle memory unmap while hardware sampling is running Robert Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101220130629.974963910@linux.vnet.ibm.com \
--to=graalfs@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=maranp@linux.vnet.ibm.com \
--cc=mingo@elte.hu \
--cc=oprofile-list@lists.sf.net \
--cc=robert.richter@amd.com \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.