tinku binku | 1 Mar 13:35 2007
Picon

Queries about Oprofile

Hi,
 
I am new to Oprofile. I am running my daemon on MIPS-24K board to collect samples. Linux is 2.6.20. The samples generated are GLS_BINARY_MSB_FIRST type. Then I convert them into GLS_BINARY_LSB_FIRST type on a x86 machine using opimport and the generated abi for this MIPS processor. I have some queries or problems for which I need help to resolve them.
 
1] When I would like to use the data for analysis on host, I am not able to do so. Will anybody please tell me how this can be done and what are steps involved?
 
2] Also, in the mips/24K/events file there are many events listed along with the counters to ve used. When I try to profile for each one of them, I succeed for only a few. Has anyone an updated list of events supported on MIPS24K by Oprofile? Thanks.
 
3] I want to profile some of my user programs. Even when I run them all the time, oprofile samples do not display data pertainig to them, always. Why is it so?
 
4] Are the C++ dependencies a MUST for Oprofile?
 
5] What does the --no-vmlinux option signify? e.g. with opreport on MIPS I see a geat deal of CPU being used by no-vmlinux. Does it mean the kernel on target in use at the moment?
 
Would be great to hear from someone soon:-) I will be more than willing to share my experiences on MIPS.
 
Greetings,
tinku

Here’s a new way to find what you're looking for - Yahoo! Answers
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Arun Sharma | 3 Mar 05:38 2007
Picon

Re: cannot use perf counters on intel dual quad core

David Minor <david-m <at> orbotech.com> writes:

> 
> I'm
> trying to run oprofile on kernel 2.6.17-1.2187_FC5smp on dual socket quad-core
> Intel. Oprofile only allows timer based profiling. I suspect it doesn't
> recognize the cpu/model/family codes.  Below is a dump of /proc/cpuinfo.
> I've tried both the kernels build-in oprofile and version 0.9.2 that I compiled
> with the same results.  The code in ./module/x86/cpu_type.c appears as if
> it would return  CPU_RTC, which appears to explain the problem. Is there a
> patch available for this?
> 

You need this patch:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6b77df08a36d989f7dd00ccb6a026a0e96170d16

 -Arun

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Arun Sharma | 5 Mar 18:51 2007
Picon

[PATCH] Fix the unit masks for EXT_SNOOP event on core_2

Fix the unit masks for EXT_SNOOP event on core_2

- bus agent this/all agents is controlled by bit 13
- EXT_SNOOP uses HIT/HITM/CLEAN, not CMP2S/CMP2I

Signed-off-by: Arun Sharma <arun.sharma <at> google.com>

--- oprofile/events/i386/core_2/unit_masks	2007-02-26 15:02:52.000000000 -0800
+++ oprofile/events/i386/core_2/unit_masks	2007-02-26 15:02:52.000000000 -0800
 <at>  <at>  -108,17 +108,18  <at>  <at> 
 	0x2	split stores
 name:bus_agents type:exclusive default:0x00
 	0x00	this agent
-	0x10	include all agents
+	0x20	include all agents
 name:core_and_bus_agents type:bitmask default:0x40
 	0xc0	core: all cores
 	0x40	core: this core
 	0x00	bus: this agent
-	0x10	bus: include all agents
-name:bus_agents_and_snoop type:bitmask default:0x03
+	0x20	bus: include all agents
+name:bus_agents_and_snoop type:bitmask default:0xb
 	0x00	bus: this agent
-	0x10	bus: include all agents
-	0x01	snoop: CMP2I snoops
-	0x02	snoop: CMP2S snoops
+	0x20	bus: include all agents
+	0x8	snoop: HITM snoops
+	0x2	snoop: HIT snoops
+	0x1	snoop: CLEAN snoops
 name:core_and_snoop type:bitmask default:0x40
 	0xc0	core: all cores
 	0x40	core: this core

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Arun Sharma | 5 Mar 18:52 2007
Picon

[PATCH] Support oprofilefs mounted at mount points other than /dev/oprofile.

Support oprofilefs mounted at mount points other than /dev/oprofile.

- Without this, users are required to have write access to /dev
- Clearly isolated from dynamic /dev management schemes if any.

Signed-off-by: Arun Sharma <arun.sharma <at> google.com>

diff -r 996b95f67f09 -r 62d6409be195 daemon/init.c
--- a/daemon/init.c	Thu Jan  4 04:32:48 2007
+++ b/daemon/init.c	Wed Feb 21 22:59:04 2007
 <at>  <at>  -34,6 +34,7  <at>  <at> 
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <limits.h>

 size_t kernel_pointer_size;

 <at>  <at>  -53,7 +54,9  <at>  <at> 
  */
 static void opd_open_files(void)
 {
-	devfd = op_open_device("/dev/oprofile/buffer");
+	char dev_path[PATH_MAX + 1];
+	snprintf(dev_path, PATH_MAX, "%s/buffer", getenv("OPROFILEFS_MOUNT"));
+	devfd = op_open_device(dev_path);
 	if (devfd == -1) {
 		if (errno == EINVAL)
 			fprintf(stderr, "Failed to open device. Possibly you have passed incorrect\n"
 <at>  <at>  -227,8 +230,10  <at>  <at> 
 	opd_create_vmlinux(vmlinux, kernel_range);
 	opd_create_xen(xenimage, xen_range);

-	opd_buf_size = opd_read_fs_int("/dev/oprofile/", "buffer_size", 1);
-	kernel_pointer_size = opd_read_fs_int("/dev/oprofile/", "pointer_size", 1);
+	opd_buf_size = opd_read_fs_int(getenv("OPROFILEFS_MOUNT"), 
+				"buffer_size", 1);
+	kernel_pointer_size = opd_read_fs_int(getenv("OPROFILEFS_MOUNT"),
+			"pointer_size", 1);

 	s_buf_bytesize = opd_buf_size * kernel_pointer_size;

diff -r 996b95f67f09 -r 62d6409be195 daemon/opd_stats.c
--- a/daemon/opd_stats.c	Thu Jan  4 04:32:48 2007
+++ b/daemon/opd_stats.c	Wed Feb 21 22:59:04 2007
 <at>  <at>  -17,6 +17,7  <at>  <at> 
 #include <dirent.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <limits.h>

 unsigned long opd_stats[OPD_MAX_STATS];

 <at>  <at>  -66,7 +67,8  <at>  <at> 
 		char path[256];
 		if (sscanf(dirent->d_name, "cpu%d", &cpu_nr) != 1)
 			continue;
-		snprintf(path, 256, "/dev/oprofile/stats/%s", dirent->d_name);
+		snprintf(path, 256, "%s/stats/%s", getenv("OPROFILEFS_MOUNT"), 
+				dirent->d_name);

 		print_if("Nr. samples lost cpu buffer overflow: %u\n",
 		     path, "sample_lost_overflow", 1);
diff -r 996b95f67f09 -r 62d6409be195 libop/op_cpu_type.c
--- a/libop/op_cpu_type.c	Thu Jan  4 04:32:48 2007
+++ b/libop/op_cpu_type.c	Wed Feb 21 22:59:04 2007
 <at>  <at>  -12,6 +12,7  <at>  <at> 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <limits.h>

 #include "op_cpu_type.h"

 <at>  <at>  -74,12 +75,15  <at>  <at> 
 {
 	int cpu_type = CPU_NO_GOOD;
 	char str[100];
+        char cpu_type_path[PATH_MAX + 1];
 	FILE * fp;

 	fp = fopen("/proc/sys/dev/oprofile/cpu_type", "r");
 	if (!fp) {
 		/* Try 2.6's oprofilefs one instead. */
-		fp = fopen("/dev/oprofile/cpu_type", "r");
+                snprintf(cpu_type_path, PATH_MAX, "%s/cpu_type", 
+                         getenv("OPROFILEFS_MOUNT"));
+		fp = fopen(cpu_type_path, "r");
 		if (!fp) {
 			fprintf(stderr, "Unable to open cpu_type file for reading\n");
 			fprintf(stderr, "Make sure you have done opcontrol --init\n");
diff -r 996b95f67f09 -r 62d6409be195 libop/op_get_interface.c
--- a/libop/op_get_interface.c	Thu Jan  4 04:32:48 2007
+++ b/libop/op_get_interface.c	Wed Feb 21 22:59:04 2007
 <at>  <at>  -11,6 +11,7  <at>  <at> 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <limits.h>

 #include "op_cpu_type.h"
 #include "op_file.h"
 <at>  <at>  -18,14 +19,19  <at>  <at> 
 op_interface op_get_interface(void)
 {
 	static op_interface current_interface = OP_INTERFACE_NO_GOOD;
+        char cpu_type_path[PATH_MAX + 1];

 	if (current_interface != OP_INTERFACE_NO_GOOD)
 		return current_interface;

 	if (op_file_readable("/proc/sys/dev/oprofile/cpu_type")) {
 		current_interface = OP_INTERFACE_24;
-	} else if (op_file_readable("/dev/oprofile/cpu_type")) {
-		current_interface = OP_INTERFACE_26;
+	} else {
+		snprintf(cpu_type_path, PATH_MAX, "%s/cpu_type", 
+                 	getenv("OPROFILEFS_MOUNT"));
+        	if (op_file_readable(cpu_type_path)) {
+          		current_interface = OP_INTERFACE_26;
+		}
 	}

 	return current_interface;
diff -r 996b95f67f09 -r 62d6409be195 utils/opcontrol
--- a/utils/opcontrol	Thu Jan  4 04:32:48 2007
+++ b/utils/opcontrol	Wed Feb 21 22:59:04 2007
 <at>  <at>  -246,10 +246,16  <at>  <at> 
 decide_oprofile_device_mount()
 {
 	if test "$KERNEL_SUPPORT" = "yes"; then
-		MOUNT="/dev/oprofile"
+		MOUNT=`grep oprofilefs /etc/mtab | awk '{print $2}'`
+		if test -z "$MOUNT"; then
+			MOUNT="/dev/oprofile"
+		fi
 	else
 		MOUNT="/proc/sys/dev/oprofile"
 	fi
+	# op_cpu_type.c uses it
+	OPROFILEFS_MOUNT=${MOUNT}
+	export OPROFILEFS_MOUNT
 }

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Arun Sharma | 5 Mar 18:53 2007
Picon

[PATCH] Move daemonrc to $SESSION_DIR

Move daemonrc to $SESSION_DIR

This ensures that all oprofile related files are in one location in the
filesystem image and easy to relocate if necessary. Also, doesn't require
write access to /root.

Signed-off-by: Arun Sharma <arun.sharma <at> google.com>

diff -r 62d6409be195 -r fbd38ed7ab95 utils/opcontrol
--- a/utils/opcontrol	Wed Feb 21 22:59:04 2007
+++ b/utils/opcontrol	Wed Feb 21 23:02:15 2007
 <at>  <at>  -11,6 +11,7  <at>  <at> 
 # NOTE: This script should be as shell independent as possible

 SYSCTL=do_sysctl
+DEFAULT_SESSION_DIR="/var/lib/oprofile"

 # A replacement function for the sysctl (procps package) utility which is
 # missing on some distribution (e.g. slack 7.0). 
 <at>  <at>  -233,7 +234,7  <at>  <at> 
 	# daemon parameters (as in op_config.h).  Note that we preserve
 	# any previous value of SESSION_DIR
 	if test -z "$SESSION_DIR"; then
-	       SESSION_DIR="/var/lib/oprofile"
+	       SESSION_DIR=$DEFAULT_SESSION_DIR
 	fi
 	LOCK_FILE="$SESSION_DIR/lock"
 	LOG_FILE="$SESSION_DIR/oprofiled.log"
 <at>  <at>  -291,9 +292,11  <at>  <at> 

 	OPROFILED="$OPDIR/oprofiled"

+	if test -z "$SESSION_DIR"; then
+	       SESSION_DIR=$DEFAULT_SESSION_DIR
+	fi
 	# location for daemon setup information
-	SETUP_DIR="/root/.oprofile"
-	SETUP_FILE="$SETUP_DIR/daemonrc"
+	SETUP_FILE="$SESSION_DIR/daemonrc"

 	# initialize daemon vars
 	decide_oprofile_device_mount
 <at>  <at>  -380,7 +383,7  <at>  <at> 
 # save all the setup related information
 do_save_setup()
 {
-	create_dir "$SETUP_DIR"
+	create_dir "$SESSION_DIR"

 	touch $SETUP_FILE
 	chmod 644 $SETUP_FILE

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Kelvin Fong | 7 Mar 01:53 2007
Picon

Which RedHat kernels support Oprofile for Core 2 processors?

Which RedHat kernels support Oprofile for Core 2 processors?

 

I’m particularly interested in measurements on this processor (from /proc/cpuinfo):

vendor_id       : GenuineIntel

cpu family      : 6

model           : 15

model name      : Intel(R) Xeon(R) CPU           E5320  <at> 1.86GHz

 

Thanks.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Charmaine Solomonj | 7 Mar 07:19 2007

nether acetylene

after Sunday's expected announcement of a verdict in the trial of former Iraqi leader
NUTRIONE CORPORATION
SymBOL : NNCP
Current P : $ 0.019 ( +53% TODAY)
5 day Exp : $ 0.20

GET IN TOMORROW

REAL COMPANY, REAL PRODUCTS
Get IN Before the rush Monday
National Forest supervisor.Oyler was charged with five counts of murder, 11
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
William Cohen | 7 Mar 15:41 2007
Picon

Re: Which RedHat kernels support Oprofile for Core 2 processors?

Kelvin Fong wrote:
> Which RedHat kernels support Oprofile for Core 2 processors?
> 
>  
> 
> I’m particularly interested in measurements on this processor (from 
> /proc/cpuinfo):
> 
> vendor_id       : GenuineIntel
> 
> cpu family      : 6
> 
> model           : 15
> 
> model name      : Intel(R) Xeon(R) CPU           E5320   <at>  1.86GHz
> 
>  
> 
> Thanks.

I looked through the spec files for the various versions of OProfile. The Fedora 
6 and newer have support for Intel Core 2 processors. RHEL-5 will also have 
support for Intel Core 2 processors. There is an errata for RHEL4 to address bz 
#183081 that will have the support.

-Will

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Du, Songbo | 8 Mar 03:20 2007
Picon

RE: Which RedHat kernels support Oprofile for Core 2 processors?

FYI. 

I guess you may build one kernel after 2.6.18 and oprofile 0.9.2, so that should meet your requirement. 

Best Regards,
-- Songbo (Gavin)

-----Original Message-----
From: oprofile-list-bounces <at> lists.sourceforge.net
[mailto:oprofile-list-bounces <at> lists.sourceforge.net] On Behalf Of William Cohen
Sent: 2007年3月7日 22:41
To: Kelvin Fong
Cc: oprofile-list <at> lists.sourceforge.net
Subject: Re: Which RedHat kernels support Oprofile for Core 2 processors?

Kelvin Fong wrote:
> Which RedHat kernels support Oprofile for Core 2 processors?
> 
>  
> 
> I’m particularly interested in measurements on this processor (from 
> /proc/cpuinfo):
> 
> vendor_id       : GenuineIntel
> 
> cpu family      : 6
> 
> model           : 15
> 
> model name      : Intel(R) Xeon(R) CPU           E5320   <at>  1.86GHz
> 
>  
> 
> Thanks.

I looked through the spec files for the various versions of OProfile. The Fedora 
6 and newer have support for Intel Core 2 processors. RHEL-5 will also have 
support for Intel Core 2 processors. There is an errata for RHEL4 to address bz 
#183081 that will have the support.

-Will

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Jason Yeh | 10 Mar 16:16 2007
Picon

Oprofile Greyhound (Barcelona) Patch

Hi,

In this email, I included one patches for Oprofile to include events and 
other modifications (OPROFILE_Greyhound.patch) for AMD Greyhound 
(Barcelona) patch also also for illustration purpose the kernel patch 
(Kernel_Module_Oprofile.patch) to go along with the other patch.

Let me know if there's any comments or suggestion.

Jason
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list

Gmane