SourceForge.net | 1 Oct 05:23 2010
Picon
Picon

[ oprofile-Bugs-3053794 ] ophelp -X doesn't display event's unit mask type

Bugs item #3053794, was opened at 2010-08-26 16:17
Message generated for change (Comment added) made by rgrunber
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116191&aid=3053794&group_id=16191

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Roland Grunberg (rgrunber)
Assigned to: Maynard Johnson (maynardj)
Summary: ophelp -X doesn't display event's unit mask type

Initial Comment:
oprofile-0.9.6-6.fc13.i686 

It would be nice if "ophelp -X" displayed the unit mask type (mandatory, exclusive, bitmask) as an
attribute in the <unit_masks> tag.

----------------------------------------------------------------------

>Comment By: Roland Grunberg (rgrunber)
Date: 2010-09-30 23:23

Message:
(Continue reading)

Robert Richter | 1 Oct 17:03 2010
Picon

Re: [PATCHv2 0/2] oprofile, x86: allow backtrace for 32bit apps under 64bit kernel

On 29.09.10 10:46:45, Jiri Olsa wrote:
> I'm sending reworked version of the support for backtrace of ia32
> applications under 64bit kernels.
> 
> updates are based on comments by Robert Richter
> 
> v2:
> 	- using struct stack_frame for 64bit processes
> 	- using struct stack_frame_ia32 for compat processes
> 	- added inline function x86_backtrace_32 which is
> 	  just empty stub for !CONFIG_COMPAT
> 	- I did not figure out a smart way to share dump code between
> 	  32 and 64 bits. I'm currently under impression the code is
> 	  so far easy and light enough to live separately and mixing
> 	  the code would come with more complexity.
> 
> 
> attached patches:
> - 1/2 using struct stack_frame for 64bit processes dump
> - 2/2 adding backtrace dump for 32bit process in compat mode
> 
> please let me know what you think
> 
> thanks,
> jirka
> ---
>  arch/x86/oprofile/backtrace.c |   70 ++++++++++++++++++++++++++++++++++------
>  1 files changed, 59 insertions(+), 11 deletions(-)

Applied to oprofile/core. Thanks Jirka.
(Continue reading)

SourceForge.net | 1 Oct 18:05 2010
Picon
Picon

[ oprofile-Bugs-3053794 ] ophelp -X doesn't display event's unit mask type

Bugs item #3053794, was opened at 2010-08-26 15:17
Message generated for change (Comment added) made by maynardj
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116191&aid=3053794&group_id=16191

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Roland Grunberg (rgrunber)
Assigned to: Maynard Johnson (maynardj)
Summary: ophelp -X doesn't display event's unit mask type

Initial Comment:
oprofile-0.9.6-6.fc13.i686 

It would be nice if "ophelp -X" displayed the unit mask type (mandatory, exclusive, bitmask) as an
attribute in the <unit_masks> tag.

----------------------------------------------------------------------

>Comment By: Maynard Johnson (maynardj)
Date: 2010-10-01 11:05

Message:
(Continue reading)

Robert Richter | 1 Oct 17:56 2010
Picon

[PATCH 0/5] oprofile updates for v2.6.37

This patch set contains some rework and cleanups of the oprofile code.
It also contains changes of the oprofile perf backend that is
currently implemented for the ARM architecture, but will be ported to
oprofile generic code.

Will, please ack the ARM changes if you are fine with it.

Matt, these patches may cause conflicts with your next patch set, so I
am fine with it if you are not rebasing your code. I will apply them
then to a different branch and solve the conflicts myself.

Ingo, this patch set is for review only. If there are no objections
with it I am going to apply it to my oprofile tree.

Thanks for review,

-Robert

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
Robert Richter | 1 Oct 17:56 2010
Picon

[PATCH 1/5] oprofile, x86: Simplify init/exit functions

Now, that we only call the exit function if init succeeds with commit:

 979048e oprofile: don't call arch exit code from init code on failure

we can simplify the x86 init/exit functions too. Variable using_nmi
becomes obsolete.

Signed-off-by: Robert Richter <robert.richter <at> amd.com>
---
 arch/x86/oprofile/nmi_int.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index f1575c9..bd1489c 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
 <at>  <at>  -695,9 +695,6  <at>  <at>  static int __init ppro_init(char **cpu_type)
 	return 1;
 }

-/* in order to get sysfs right */
-static int using_nmi;
-
 int __init op_nmi_init(struct oprofile_operations *ops)
 {
 	__u8 vendor = boot_cpu_data.x86_vendor;
 <at>  <at>  -705,8 +702,6  <at>  <at>  int __init op_nmi_init(struct oprofile_operations *ops)
 	char *cpu_type = NULL;
 	int ret = 0;

(Continue reading)

Robert Richter | 1 Oct 17:56 2010
Picon

[PATCH 2/5] oprofile, ARM: Use oprofile_arch_exit() to cleanup on failure

There is duplicate cleanup code in the init and exit functions. Now,
oprofile_arch_exit() is also used if oprofile_arch_init() fails.

Cc: Will Deacon <will.deacon <at> arm.com>
Signed-off-by: Robert Richter <robert.richter <at> amd.com>
---
 arch/arm/oprofile/common.c |   53 +++++++++++++++++++++----------------------
 1 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index bd7426f..7ae9eeb 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
 <at>  <at>  -348,10 +348,33  <at>  <at>  static void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
 		tail = user_backtrace(tail);
 }

+void oprofile_arch_exit(void)
+{
+	int cpu, id;
+	struct perf_event *event;
+
+	for_each_possible_cpu(cpu) {
+		for (id = 0; id < perf_num_counters; ++id) {
+			event = perf_events[cpu][id];
+			if (event)
+				perf_event_release_kernel(event);
+		}
+
+		kfree(perf_events[cpu]);
(Continue reading)

Robert Richter | 1 Oct 17:56 2010
Picon

[PATCH 5/5] oprofile: Remove duplicate code around __oprofilefs_create_file()

Removing duplicate code by assigning the inodes private data pointer
in __oprofilefs_create_file(). Extending the function interface to
pass the pointer.

Signed-off-by: Robert Richter <robert.richter <at> amd.com>
---
 drivers/oprofile/oprofilefs.c |   46 ++++++++++++----------------------------
 1 files changed, 14 insertions(+), 32 deletions(-)

diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
index 2766a6d..789a1a8 100644
--- a/drivers/oprofile/oprofilefs.c
+++ b/drivers/oprofile/oprofilefs.c
 <at>  <at>  -126,50 +126,41  <at>  <at>  static const struct file_operations ulong_ro_fops = {
 };

 
-static struct dentry *__oprofilefs_create_file(struct super_block *sb,
+static int __oprofilefs_create_file(struct super_block *sb,
 	struct dentry *root, char const *name, const struct file_operations *fops,
-	int perm)
+	int perm, void *priv)
 {
 	struct dentry *dentry;
 	struct inode *inode;

 	dentry = d_alloc_name(root, name);
 	if (!dentry)
-		return NULL;
+		return -ENOMEM;
(Continue reading)

Robert Richter | 1 Oct 17:56 2010
Picon

[PATCH 4/5] oprofile, ARM: Remove some goto statements

This patch removes some unnecessary goto statements.

Cc: Will Deacon <will.deacon <at> arm.com>
Signed-off-by: Robert Richter <robert.richter <at> amd.com>
---
 arch/arm/oprofile/common.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index cec9305..ab875f3 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
 <at>  <at>  -135,11 +135,10  <at>  <at>  static int op_perf_start(void)
 		for (event = 0; event < perf_num_counters; ++event) {
 			ret = op_create_counter(cpu, event);
 			if (ret)
-				goto out;
+				return ret;
 		}
 	}

-out:
 	return ret;
 }

 <at>  <at>  -263,7 +262,7  <at>  <at>  static int __init init_driverfs(void)

 	ret = platform_driver_register(&oprofile_driver);
 	if (ret)
-		goto out;
(Continue reading)

Robert Richter | 1 Oct 17:56 2010
Picon

[PATCH 3/5] oprofile, ARM: Rework op_create_counter()

This patch simplifies op_create_counter(). Removing if/else if paths
and return code variable by direct returning from function.

Cc: Will Deacon <will.deacon <at> arm.com>
Signed-off-by: Robert Richter <robert.richter <at> amd.com>
---
 arch/arm/oprofile/common.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index 7ae9eeb..cec9305 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
 <at>  <at>  -89,28 +89,28  <at>  <at>  static void op_perf_setup(void)

 static int op_create_counter(int cpu, int event)
 {
-	int ret = 0;
 	struct perf_event *pevent;

-	if (!counter_config[event].enabled || (perf_events[cpu][event] != NULL))
-		return ret;
+	if (!counter_config[event].enabled || perf_events[cpu][event])
+		return 0;

 	pevent = perf_event_create_kernel_counter(&counter_config[event].attr,
 						  cpu, -1,
 						  op_overflow_handler);

-	if (IS_ERR(pevent)) {
(Continue reading)

Will Deacon | 1 Oct 19:05 2010

Re: [PATCH 0/5] oprofile updates for v2.6.37

Hello Robert,

On Fri, 2010-10-01 at 16:56 +0100, Robert Richter wrote:
> This patch set contains some rework and cleanups of the oprofile code.
> It also contains changes of the oprofile perf backend that is
> currently implemented for the ARM architecture, but will be ported to
> oprofile generic code.
> 
> Will, please ack the ARM changes if you are fine with it.
> 

I've been through patches 2, 3 and 4 and they look fine. I've also
tested them and can't see any regressions. Thanks for sticking with
this!

Acked-by: Will Deacon <will.deacon <at> arm.com>

Have a good weekend,

Will

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev

Gmane