diff options
author | Richard Purdie <richard@openedhand.com> | 2007-10-03 15:09:20 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-10-03 15:09:20 +0000 |
commit | 9ea931ac94fd6957577d20585fd009af8ae622a9 (patch) | |
tree | 7715e66ae794c557bed3600933ffe56ea448effa /meta/packages/oprofile/oprofile/opstart.patch | |
parent | d195594897552a1d18af523a3f7b321482df48df (diff) | |
download | poky-9ea931ac94fd6957577d20585fd009af8ae622a9.tar.gz |
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
Diffstat (limited to 'meta/packages/oprofile/oprofile/opstart.patch')
-rw-r--r-- | meta/packages/oprofile/oprofile/opstart.patch | 122 |
1 files changed, 104 insertions, 18 deletions
diff --git a/meta/packages/oprofile/oprofile/opstart.patch b/meta/packages/oprofile/oprofile/opstart.patch index 45109167a4..e8da0922cc 100644 --- a/meta/packages/oprofile/oprofile/opstart.patch +++ b/meta/packages/oprofile/oprofile/opstart.patch | |||
@@ -1,13 +1,7 @@ | |||
1 | --- | 1 | Index: oprofile/utils/Makefile.am |
2 | configure.in | 1 | ||
3 | utils/Makefile.am | 11 +++++ | ||
4 | utils/opstart.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
5 | 3 files changed, 116 insertions(+), 1 deletion(-) | ||
6 | |||
7 | Index: oprofile-0.9.3/utils/Makefile.am | ||
8 | =================================================================== | 2 | =================================================================== |
9 | --- oprofile-0.9.3.orig/utils/Makefile.am 2007-09-05 12:55:48.000000000 +0100 | 3 | --- oprofile.orig/utils/Makefile.am |
10 | +++ oprofile-0.9.3/utils/Makefile.am 2007-09-05 15:20:34.000000000 +0100 | 4 | +++ oprofile/utils/Makefile.am |
11 | @@ -3,8 +3,15 @@ AM_CFLAGS = @OP_CFLAGS@ | 5 | @@ -3,8 +3,15 @@ AM_CFLAGS = @OP_CFLAGS@ |
12 | 6 | ||
13 | LIBS=@POPT_LIBS@ @LIBERTY_LIBS@ | 7 | LIBS=@POPT_LIBS@ @LIBERTY_LIBS@ |
@@ -25,11 +19,11 @@ Index: oprofile-0.9.3/utils/Makefile.am | |||
25 | + cd $(DESTDIR)/$(bindir) && \ | 19 | + cd $(DESTDIR)/$(bindir) && \ |
26 | + rm -f opstop && \ | 20 | + rm -f opstop && \ |
27 | + $(LN_S) opstart opstop | 21 | + $(LN_S) opstart opstop |
28 | Index: oprofile-0.9.3/utils/opstart.c | 22 | Index: oprofile/utils/opstart.c |
29 | =================================================================== | 23 | =================================================================== |
30 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 24 | --- /dev/null |
31 | +++ oprofile-0.9.3/utils/opstart.c 2007-09-05 15:27:38.000000000 +0100 | 25 | +++ oprofile/utils/opstart.c |
32 | @@ -0,0 +1,105 @@ | 26 | @@ -0,0 +1,110 @@ |
33 | +/** | 27 | +/** |
34 | + * @file opstart.c | 28 | + * @file opstart.c |
35 | + * Start/Stop oprofile | 29 | + * Start/Stop oprofile |
@@ -57,6 +51,11 @@ Index: oprofile-0.9.3/utils/opstart.c | |||
57 | + FILE *lfile, *efile; | 51 | + FILE *lfile, *efile; |
58 | + int sig, enb, err; | 52 | + int sig, enb, err; |
59 | + | 53 | + |
54 | + if (argc >= 2) { | ||
55 | + printf("Error: Invalid options.\n"); | ||
56 | + return 1; | ||
57 | + } | ||
58 | + | ||
60 | + lockfile = getenv("LOCK_FILE"); | 59 | + lockfile = getenv("LOCK_FILE"); |
61 | + if (!lockfile) | 60 | + if (!lockfile) |
62 | + lockfile = "/var/lib/oprofile/lock"; | 61 | + lockfile = "/var/lib/oprofile/lock"; |
@@ -89,7 +88,7 @@ Index: oprofile-0.9.3/utils/opstart.c | |||
89 | + return 1; | 88 | + return 1; |
90 | + } | 89 | + } |
91 | + | 90 | + |
92 | + err = fscanf(lfile, "%ud", &dpid); | 91 | + err = fscanf(lfile, "%lud", (unsigned long *) &dpid); |
93 | + if (err != 1) { | 92 | + if (err != 1) { |
94 | + printf("Error reading pid from lockfile %s.\n", lockfile); | 93 | + printf("Error reading pid from lockfile %s.\n", lockfile); |
95 | + return 1; | 94 | + return 1; |
@@ -135,11 +134,11 @@ Index: oprofile-0.9.3/utils/opstart.c | |||
135 | + return 0; | 134 | + return 0; |
136 | +} | 135 | +} |
137 | + | 136 | + |
138 | Index: oprofile-0.9.3/configure.in | 137 | Index: oprofile/configure.in |
139 | =================================================================== | 138 | =================================================================== |
140 | --- oprofile-0.9.3.orig/configure.in 2007-09-05 15:23:24.000000000 +0100 | 139 | --- oprofile.orig/configure.in |
141 | +++ oprofile-0.9.3/configure.in 2007-09-05 15:23:36.000000000 +0100 | 140 | +++ oprofile/configure.in |
142 | @@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(oprofile, 0.9.3) | 141 | @@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(oprofile, 0.9.4cvs) |
143 | AM_CONFIG_HEADER(config.h) | 142 | AM_CONFIG_HEADER(config.h) |
144 | 143 | ||
145 | AC_PROG_RANLIB | 144 | AC_PROG_RANLIB |
@@ -147,3 +146,90 @@ Index: oprofile-0.9.3/configure.in | |||
147 | 146 | ||
148 | dnl for the man page | 147 | dnl for the man page |
149 | DATE="`date '+%a %d %B %Y'`" | 148 | DATE="`date '+%a %d %B %Y'`" |
149 | @@ -227,6 +228,8 @@ AC_OUTPUT(Makefile \ | ||
150 | doc/xsl/catalog-1.xml \ | ||
151 | doc/oprofile.1 \ | ||
152 | doc/opcontrol.1 \ | ||
153 | + doc/opstart.1 \ | ||
154 | + doc/opstop.1 \ | ||
155 | doc/ophelp.1 \ | ||
156 | doc/opreport.1 \ | ||
157 | doc/opannotate.1 \ | ||
158 | Index: oprofile/doc/Makefile.am | ||
159 | =================================================================== | ||
160 | --- oprofile.orig/doc/Makefile.am | ||
161 | +++ oprofile/doc/Makefile.am | ||
162 | @@ -11,6 +11,8 @@ STYLESHEETS=$(CHUNK_XHTML_STYLESHEET) $( | ||
163 | man_MANS = \ | ||
164 | oprofile.1 \ | ||
165 | opcontrol.1 \ | ||
166 | + opstart.1 \ | ||
167 | + opstop.1 \ | ||
168 | opreport.1 \ | ||
169 | opannotate.1 \ | ||
170 | opgprof.1 \ | ||
171 | Index: oprofile/doc/opstart.1.in | ||
172 | =================================================================== | ||
173 | --- /dev/null | ||
174 | +++ oprofile/doc/opstart.1.in | ||
175 | @@ -0,0 +1,27 @@ | ||
176 | +.TH OPSTART 1 "@DATE@" "oprofile @VERSION@" | ||
177 | +.UC 4 | ||
178 | +.SH NAME | ||
179 | +opstart \- start OProfile profiling | ||
180 | +.SH SYNOPSIS | ||
181 | +.br | ||
182 | +.B opstart | ||
183 | +.SH DESCRIPTION | ||
184 | +.B opstart | ||
185 | +is a simple optimised command to start profiling with 2.6 Linux kernels. | ||
186 | +OProfile should have already been initialised by calling "opcontrol --start-daemon". | ||
187 | + | ||
188 | +.SH ENVIRONMENT | ||
189 | +No special environment variables are recognised by opstart. | ||
190 | + | ||
191 | +.SH FILES | ||
192 | +.TP | ||
193 | +.I /var/lib/oprofile/samples/ | ||
194 | +The location of the generated sample files. | ||
195 | + | ||
196 | +.SH VERSION | ||
197 | +.TP | ||
198 | +This man page is current for @PACKAGE@-@VERSION@. | ||
199 | + | ||
200 | +.SH SEE ALSO | ||
201 | +.BR @OP_DOCDIR@, | ||
202 | +.BR oprofile(1) | ||
203 | Index: oprofile/doc/opstop.1.in | ||
204 | =================================================================== | ||
205 | --- /dev/null | ||
206 | +++ oprofile/doc/opstop.1.in | ||
207 | @@ -0,0 +1,28 @@ | ||
208 | +.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@" | ||
209 | +.UC 4 | ||
210 | +.SH NAME | ||
211 | +opstop \- stop OProfile profiling | ||
212 | +.SH SYNOPSIS | ||
213 | +.br | ||
214 | +.B opstop | ||
215 | +.SH DESCRIPTION | ||
216 | +.B opstop | ||
217 | +is a simple optimsed command to stop profiling with 2.6 Linux kernels. | ||
218 | +You need to run "opcontrol --dump" before being able to view a profile | ||
219 | +with opreport. | ||
220 | + | ||
221 | +.SH ENVIRONMENT | ||
222 | +No special environment variables are recognised by opstop. | ||
223 | + | ||
224 | +.SH FILES | ||
225 | +.TP | ||
226 | +.I /var/lib/oprofile/samples/ | ||
227 | +The location of the generated sample files. | ||
228 | + | ||
229 | +.SH VERSION | ||
230 | +.TP | ||
231 | +This man page is current for @PACKAGE@-@VERSION@. | ||
232 | + | ||
233 | +.SH SEE ALSO | ||
234 | +.BR @OP_DOCDIR@, | ||
235 | +.BR oprofile(1) | ||