[oe-commits] org.oe.dev oprofile: sync with poky

koen commit oe at amethyst.openembedded.net
Tue Jun 17 13:08:42 UTC 2008


oprofile: sync with poky

Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: 8a7d66394a2db576f5f945a59a113dfe1747df03
ViewMTN: http://monotone.openembedded.org/revision/info/8a7d66394a2db576f5f945a59a113dfe1747df03
Files:
1
packages/oprofile/oprofile/armv6_fix.patch
packages/oprofile/oprofile/fix-arith.patch
packages/oprofile/oprofile/oparchive_fix.patch
packages/oprofile/oprofile/opstart.patch
packages/oprofile/oprofile/root_option.patch
packages/oprofile/oprofile/xml_callgraph_details.patch
packages/oprofile/oprofileui-svn.inc
packages/oprofile/oprofileui.inc
packages/oprofile/oprofileui_svn.bb
conf/distro/include/sane-srcdates.inc
conf/distro/include/sane-srcrevs.inc
packages/oprofile/oprofile_0.9.3.bb
packages/oprofile/oprofile_cvs.bb
Diffs:

#
# mt diff -rd75ab10b249c06d8a23f7fd6dcc2970d3e9d8fab -r8a7d66394a2db576f5f945a59a113dfe1747df03
#
#
#
# add_file "packages/oprofile/oprofile/armv6_fix.patch"
#  content [5603ec2069bdcd2a5b0102f5666bf662ea6c9bda]
# 
# add_file "packages/oprofile/oprofile/fix-arith.patch"
#  content [94c018206eb1555fb068cb5bb10fa0df596bd167]
# 
# add_file "packages/oprofile/oprofile/oparchive_fix.patch"
#  content [d12a72a44c46f0d9e72d4e907e3cf90ea0894b35]
# 
# add_file "packages/oprofile/oprofile/opstart.patch"
#  content [b908d1172451d2293083c4043b8b4fa6a5986f08]
# 
# add_file "packages/oprofile/oprofile/root_option.patch"
#  content [095f0845a3c86392b7150d54901e18645ad959ab]
# 
# add_file "packages/oprofile/oprofile/xml_callgraph_details.patch"
#  content [fe10c0f4ec9d740f7718c5448f0a368aefe6c887]
# 
# add_file "packages/oprofile/oprofileui-svn.inc"
#  content [2ea13ed1504dc8ee07ee046f7e0f3286dcb383e9]
# 
# add_file "packages/oprofile/oprofileui.inc"
#  content [47666017b5d02717362acb3ac48700167303e9cf]
# 
# add_file "packages/oprofile/oprofileui_svn.bb"
#  content [c77d711540b2579664f7a018d81d8a626339a1e1]
# 
# patch "conf/distro/include/sane-srcdates.inc"
#  from [cfc0adacd56bc877d9a3b6c76e0f0c96aa316ae5]
#    to [6ba2cf7787b2136c08a7c9a4ce71f239b2ad2ffa]
# 
# patch "conf/distro/include/sane-srcrevs.inc"
#  from [a6040c27e849359c20c484582c9820647a58683f]
#    to [0b433ddda3d56e0d3d91f1c8730f0106aaaf69c5]
# 
# patch "packages/oprofile/oprofile_0.9.3.bb"
#  from [a084caeffd2ac9506fb9d4e8cedf2a8e04a6757d]
#    to [23bb15274689c1ea9ae4c032498d980b567cf0c0]
# 
# patch "packages/oprofile/oprofile_cvs.bb"
#  from [219f961286e4c839f32b63f5e425108ac7e3dacd]
#    to [8762b088fad85c1082825ff1935df909accc4f05]
#
============================================================
--- packages/oprofile/oprofile/armv6_fix.patch	5603ec2069bdcd2a5b0102f5666bf662ea6c9bda
+++ packages/oprofile/oprofile/armv6_fix.patch	5603ec2069bdcd2a5b0102f5666bf662ea6c9bda
@@ -0,0 +1,54 @@
+---
+ events/arm/armv6/events |   43 +++++++++++++++++++++----------------------
+ 1 file changed, 21 insertions(+), 22 deletions(-)
+
+Index: oprofile-0.9.3/events/arm/armv6/events
+===================================================================
+--- oprofile-0.9.3.orig/events/arm/armv6/events	2007-07-16 19:22:17.000000000 +0100
++++ oprofile-0.9.3/events/arm/armv6/events	2007-09-28 11:13:32.000000000 +0100
+@@ -1,24 +1,23 @@
+ # ARM V6 events
+ #
+-event:0x00 counters:1,2 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
+-event:0x01 counters:1,2 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
+-event:0x02 counters:1,2 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
+-event:0x03 counters:1,2 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
+-event:0x04 counters:1,2 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
+-event:0x05 counters:1,2 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
+-event:0x06 counters:1,2 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
+-event:0x07 counters:1,2 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
+-event:0x09 counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
+-event:0x0a counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
+-event:0x0b counters:1,2 um:zero minimum:500 name:DCACHE_MISS : data cache miss
+-event:0x0c counters:1,2 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
+-event:0x0d counters:1,2 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
+-event:0x0f counters:1,2 um:zero minimum:500 name:TLB_MISS : Main TLB miss
+-event:0x10 counters:1,2 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
+-event:0x11 counters:1,2 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
+-event:0x12 counters:1,2 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
+-event:0x20 counters:1,2 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
+-event:0x21 counters:1,2 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
+-event:0x22 counters:1,2 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
+-event:0xff counters:1,2 um:zero minimum:500 name:CPU_CYCLES2 : clock cycles counter
+-event:0xfe counters:0 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
++event:0x00 counters:0,1 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
++event:0x01 counters:0,1 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
++event:0x02 counters:0,1 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
++event:0x03 counters:0,1 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
++event:0x04 counters:0,1 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
++event:0x05 counters:0,1 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
++event:0x06 counters:0,1 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
++event:0x07 counters:0,1 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
++event:0x09 counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
++event:0x0a counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
++event:0x0b counters:0,1 um:zero minimum:500 name:DCACHE_MISS : data cache miss
++event:0x0c counters:0,1 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
++event:0x0d counters:0,1 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
++event:0x0f counters:0,1 um:zero minimum:500 name:TLB_MISS : Main TLB miss
++event:0x10 counters:0,1 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
++event:0x11 counters:0,1 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
++event:0x12 counters:0,1 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
++event:0x20 counters:0,1 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
++event:0x21 counters:0,1 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
++event:0x22 counters:0,1 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
++event:0xff counters:0,1,2 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
============================================================
--- packages/oprofile/oprofile/fix-arith.patch	94c018206eb1555fb068cb5bb10fa0df596bd167
+++ packages/oprofile/oprofile/fix-arith.patch	94c018206eb1555fb068cb5bb10fa0df596bd167
@@ -0,0 +1,52 @@
+Index: utils/opcontrol
+===================================================================
+RCS file: /cvsroot/oprofile/oprofile/utils/opcontrol,v
+retrieving revision 1.148
+diff -u -r1.148 opcontrol
+--- utils/opcontrol	8 Nov 2007 09:24:30 -0000	1.148
++++ utils/opcontrol	27 Nov 2007 17:02:20 -0000
+@@ -395,7 +395,7 @@
+ 	echo "SESSION_DIR=$SESSION_DIR" >>$SETUP_FILE
+ 
+ 	if test "$NR_CHOSEN" != "0"; then
+-		for f in `seq 0 $((NR_CHOSEN - 1))`; do
++		for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ 			get_event $f
+ 			echo "CHOSEN_EVENTS_${f}=$GOTEVENT" >>$SETUP_FILE
+ 		done
+@@ -590,7 +590,7 @@
+ 	OPHELP_ARGS=
+ 
+ 	if test "$NR_CHOSEN" != 0; then
+-		for f in `seq 0 $((NR_CHOSEN - 1))`; do
++		for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ 			get_event $f
+ 			if test "$GOTEVENT" != ""; then
+ 				OPHELP_ARGS="$OPHELP_ARGS $GOTEVENT"
+@@ -612,7 +612,7 @@
+ 		return
+ 	fi
+ 
+-	for f in `seq 0 $((NR_CHOSEN - 1))`; do
++	for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ 		get_event $f
+ 		if test "$GOTEVENT" != ""; then
+ 			EVENT=`echo $GOTEVENT | awk -F: '{print $1}'`
+@@ -1226,7 +1226,7 @@
+ 	verify_counters
+ 
+ 	OPROFILED_EVENTS=
+-	for f in `seq 0 $((NR_CHOSEN - 1))`; do
++	for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ 		get_event $f
+ 		if test "$GOTEVENT" != ""; then
+ 			EVENT=`echo $GOTEVENT | awk -F: '{print $1}'`
+@@ -1383,7 +1383,7 @@
+ 	fi
+ 
+ 	if test "$NR_CHOSEN" != "0"; then
+-		for f in `seq 0 $((NR_CHOSEN - 1))`; do
++		for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ 			get_event $f
+ 			echo "Event $f: $GOTEVENT"
+ 		done
============================================================
--- packages/oprofile/oprofile/oparchive_fix.patch	d12a72a44c46f0d9e72d4e907e3cf90ea0894b35
+++ packages/oprofile/oprofile/oparchive_fix.patch	d12a72a44c46f0d9e72d4e907e3cf90ea0894b35
@@ -0,0 +1,22 @@
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp
++++ oprofile/pp/oparchive.cpp
+@@ -95,7 +95,7 @@ int oparchive(options::spec const & spec
+ 		 * to avoid overwriting files with the same name. The
+ 		 * /usr/lib/debug search path is not going to work.
+ 		 */
+-		bfd * ibfd = open_bfd(exe_name);
++		bfd * ibfd = open_bfd(options::archive_path + exe_name);
+ 		if (ibfd) {
+ 			string global(options::archive_path + DEBUGDIR);
+ 			string dirname = op_dirname(options::archive_path + 
+@@ -106,7 +106,7 @@ int oparchive(options::spec const & spec
+ 				/* found something copy it over */
+ 				string dest_debug_dir = options::outdirectory +
+ 					dirname + "/.debug/";
+-				if (create_dir(dest_debug_dir.c_str())) {
++				if (!options::list_files && create_dir(dest_debug_dir.c_str())) {
+ 					cerr << "Unable to create directory: "
+ 					<< dest_debug_dir << "." << endl;
+ 					exit (EXIT_FAILURE);
============================================================
--- packages/oprofile/oprofile/opstart.patch	b908d1172451d2293083c4043b8b4fa6a5986f08
+++ packages/oprofile/oprofile/opstart.patch	b908d1172451d2293083c4043b8b4fa6a5986f08
@@ -0,0 +1,235 @@
+Index: oprofile/utils/Makefile.am
+===================================================================
+--- oprofile.orig/utils/Makefile.am
++++ oprofile/utils/Makefile.am
+@@ -3,8 +3,15 @@ AM_CFLAGS = @OP_CFLAGS@
+ 
+ LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
+ 
+-bin_PROGRAMS = ophelp
++bin_PROGRAMS = ophelp opstart
+ dist_bin_SCRIPTS = opcontrol
+ 
+ ophelp_SOURCES = ophelp.c
+ ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a
++
++opstart_SOURCES = opstart.c
++
++install-exec-local:
++	cd $(DESTDIR)/$(bindir) && \
++		rm -f opstop && \
++		$(LN_S) opstart opstop
+Index: oprofile/utils/opstart.c
+===================================================================
+--- /dev/null
++++ oprofile/utils/opstart.c
+@@ -0,0 +1,110 @@
++/**
++ * @file opstart.c
++ * Start/Stop oprofile
++ *
++ * @remark Copyright 2007 Openedhand Ltd.
++ * @remark Read the file COPYING
++ *
++ * @author Richard Purdie
++ */
++
++#include <signal.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++
++int main(const int argc, const char* argv[])
++{
++	const char *enable = "/dev/oprofile/enable";
++	const char *lockfile;
++	unsigned long dpid;
++	struct stat sbuf;
++	FILE *lfile, *efile;
++	int sig, enb, err;
++
++	if (argc >= 2) {
++		printf("Error: Invalid options.\n");
++		return 1;
++	}
++
++	lockfile = getenv("LOCK_FILE");
++	if (!lockfile)
++		lockfile = "/var/lib/oprofile/lock";
++
++	/* Add SESSION_DIR support? */
++
++	if (geteuid()) {
++		printf("Error: This program must be run as root.\n");
++		return 1;
++	}
++
++	if (stat(enable, &sbuf)) {
++		printf("Error: Could not find /dev/oprofile/enable, the"
++		       " kernel module probably isn't loaded.\n");
++		printf("This binary only works with 2.6 kernels and oprofile"
++		       " must have been initialised with 'opcontrol --start-daemon'.\n");
++		return 1;
++	}
++
++	if (stat(lockfile, &sbuf)) {
++		printf("Error: Could not find lockfile %s.\n", lockfile);
++		printf("The oprofile daemon must be running (oprofile must"
++		       " have been initialised with 'opcontrol --start-daemon').\n");
++		return 1;
++	}
++
++	lfile = fopen(lockfile, "r");
++	if (!lfile) {
++		printf("Error opening lockfile %s.\n", lockfile);
++		return 1;
++	}
++
++	err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
++	if (err != 1) {
++		printf("Error reading pid from lockfile %s.\n", lockfile);
++		return 1;
++	}
++	fclose(lfile);
++
++	efile = fopen(enable, "r");
++	if (!efile) {
++		printf("Error opening %s.\n", enable);
++		return 1;
++	}
++
++	if (strstr(argv[0], "opstart")) {
++		printf("Starting Profiler\n");
++		sig = SIGUSR1;
++		enb = 1;
++	} else if (strstr(argv[0], "opstop")) {
++		printf("Stopping Oprofile.\n");
++		printf("You need to run 'opcontrol --dump' when the session"
++		       " is finished.\n");
++		sig = SIGUSR2;
++		enb = 0;
++	} else {
++		printf("Error: Please call as 'opstart' or 'opstop'\n");
++		return 1;
++	}
++
++	err = kill(dpid, 0);
++	if (err) {
++		printf("Error sending signal to oprofiled. Stale lockfile"
++		       " (%s) ?\n", lockfile);
++		return 1;
++	}
++
++	fprintf(efile, "%d\n", enb);
++	err = kill(dpid, sig);
++	if (err) {
++		printf("Error sending signal to oprofiled. Stale lockfile"
++		       " (%s) ?\n", lockfile);
++		return 1;
++	}
++
++	return 0;
++}
++
+Index: oprofile/configure.in
+===================================================================
+--- oprofile.orig/configure.in
++++ oprofile/configure.in
+@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(oprofile, 0.9.4cvs)
+ AM_CONFIG_HEADER(config.h)
+ 
+ AC_PROG_RANLIB
++AC_PROG_LN_S
+ 
+ dnl for the man page
+ DATE="`date '+%a %d %B %Y'`"
+@@ -227,6 +228,8 @@ AC_OUTPUT(Makefile \
+ 	doc/xsl/catalog-1.xml \
+ 	doc/oprofile.1 \
+ 	doc/opcontrol.1 \
++	doc/opstart.1 \
++	doc/opstop.1 \
+ 	doc/ophelp.1 \
+ 	doc/opreport.1 \
+ 	doc/opannotate.1 \
+Index: oprofile/doc/Makefile.am
+===================================================================
+--- oprofile.orig/doc/Makefile.am
++++ oprofile/doc/Makefile.am
+@@ -11,6 +11,8 @@ STYLESHEETS=$(CHUNK_XHTML_STYLESHEET) $(
+ man_MANS = \
+ 	oprofile.1 \
+ 	opcontrol.1 \
++	opstart.1 \
++	opstop.1 \
+ 	opreport.1 \
+ 	opannotate.1 \
+ 	opgprof.1 \
+Index: oprofile/doc/opstart.1.in
+===================================================================
+--- /dev/null
++++ oprofile/doc/opstart.1.in
+@@ -0,0 +1,27 @@
++.TH OPSTART 1 "@DATE@" "oprofile @VERSION@"
++.UC 4
++.SH NAME
++opstart \- start OProfile profiling
++.SH SYNOPSIS
++.br
++.B opstart
++.SH DESCRIPTION
++.B opstart
++is a simple optimised command to start profiling with 2.6 Linux kernels.
++OProfile should have already been initialised by calling "opcontrol --start-daemon".
++
++.SH ENVIRONMENT
++No special environment variables are recognised by opstart.
++
++.SH FILES
++.TP
++.I /var/lib/oprofile/samples/
++The location of the generated sample files.
++
++.SH VERSION
++.TP
++This man page is current for @PACKAGE at -@VERSION at .
++
++.SH SEE ALSO
++.BR @OP_DOCDIR@,
++.BR oprofile(1)
+Index: oprofile/doc/opstop.1.in
+===================================================================
+--- /dev/null
++++ oprofile/doc/opstop.1.in
+@@ -0,0 +1,28 @@
++.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@"
++.UC 4
++.SH NAME
++opstop \- stop OProfile profiling
++.SH SYNOPSIS
++.br
++.B opstop
++.SH DESCRIPTION
++.B opstop
++is a simple optimsed command to stop profiling with 2.6 Linux kernels.
++You need to run "opcontrol --dump" before being able to view a profile
++with opreport.
++
++.SH ENVIRONMENT
++No special environment variables are recognised by opstop.
++
++.SH FILES
++.TP
++.I /var/lib/oprofile/samples/
++The location of the generated sample files.
++
++.SH VERSION
++.TP
++This man page is current for @PACKAGE at -@VERSION at .
++
++.SH SEE ALSO
++.BR @OP_DOCDIR@,
++.BR oprofile(1)
============================================================
--- packages/oprofile/oprofile/root_option.patch	095f0845a3c86392b7150d54901e18645ad959ab
+++ packages/oprofile/oprofile/root_option.patch	095f0845a3c86392b7150d54901e18645ad959ab
@@ -0,0 +1,1051 @@
+Index: oprofile/libpp/arrange_profiles.cpp
+======================================================%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list