1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

oprofile: Add oparchive fix and patch to add --root option to oprofile

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2827 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2007-10-03 15:09:20 +00:00
parent d195594897
commit 9ea931ac94
4 changed files with 1182 additions and 21 deletions
@@ -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);
+104 -18
View File
@@ -1,13 +1,7 @@
---
configure.in | 1
utils/Makefile.am | 11 +++++
utils/opstart.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 116 insertions(+), 1 deletion(-)
Index: oprofile-0.9.3/utils/Makefile.am
Index: oprofile/utils/Makefile.am
===================================================================
--- oprofile-0.9.3.orig/utils/Makefile.am 2007-09-05 12:55:48.000000000 +0100
+++ oprofile-0.9.3/utils/Makefile.am 2007-09-05 15:20:34.000000000 +0100
--- oprofile.orig/utils/Makefile.am
+++ oprofile/utils/Makefile.am
@@ -3,8 +3,15 @@ AM_CFLAGS = @OP_CFLAGS@
LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
@@ -25,11 +19,11 @@ Index: oprofile-0.9.3/utils/Makefile.am
+ cd $(DESTDIR)/$(bindir) && \
+ rm -f opstop && \
+ $(LN_S) opstart opstop
Index: oprofile-0.9.3/utils/opstart.c
Index: oprofile/utils/opstart.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ oprofile-0.9.3/utils/opstart.c 2007-09-05 15:27:38.000000000 +0100
@@ -0,0 +1,105 @@
--- /dev/null
+++ oprofile/utils/opstart.c
@@ -0,0 +1,110 @@
+/**
+ * @file opstart.c
+ * Start/Stop oprofile
@@ -57,6 +51,11 @@ Index: oprofile-0.9.3/utils/opstart.c
+ 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";
@@ -89,7 +88,7 @@ Index: oprofile-0.9.3/utils/opstart.c
+ return 1;
+ }
+
+ err = fscanf(lfile, "%ud", &dpid);
+ err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
+ if (err != 1) {
+ printf("Error reading pid from lockfile %s.\n", lockfile);
+ return 1;
@@ -135,11 +134,11 @@ Index: oprofile-0.9.3/utils/opstart.c
+ return 0;
+}
+
Index: oprofile-0.9.3/configure.in
Index: oprofile/configure.in
===================================================================
--- oprofile-0.9.3.orig/configure.in 2007-09-05 15:23:24.000000000 +0100
+++ oprofile-0.9.3/configure.in 2007-09-05 15:23:36.000000000 +0100
@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(oprofile, 0.9.3)
--- 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
@@ -147,3 +146,90 @@ Index: oprofile-0.9.3/configure.in
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@-@VERSION@.
+
+.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@-@VERSION@.
+
+.SH SEE ALSO
+.BR @OP_DOCDIR@,
+.BR oprofile(1)
File diff suppressed because it is too large Load Diff
+5 -3
View File
@@ -4,12 +4,14 @@ of profiling all running code at low overhead."
LICENSE = "GPL"
DEPENDS = "popt binutils"
RDEPENDS = "binutils-symlinks"
PR = "r2"
PR = "r3"
SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \
file://armv6_fix.patch;patch=1 \
file://oparchive_fix.patch;patch=1 \
file://root_option.patch;patch=1 \
file://opstart.patch;patch=1 \
file://armv6_fix.patch;patch=1 \
file://acinclude.m4"
file://acinclude.m4"
S = "${WORKDIR}/oprofile-${PV}"
inherit autotools