summaryrefslogtreecommitdiffstats
path: root/meta/packages/oprofile
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-05-08 14:49:12 +0000
committerRichard Purdie <richard@openedhand.com>2007-05-08 14:49:12 +0000
commit87bd6e919b1a5e510542cf2946af3c4483258e97 (patch)
tree20dfd136f25517c1c595fea6420753aa592f5f1b /meta/packages/oprofile
parent3274f4f23f574d042ecb2304afc4c065864fa159 (diff)
downloadpoky-87bd6e919b1a5e510542cf2946af3c4483258e97.tar.gz
oprofile: Update cvs patches to match cvs
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1608 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/oprofile')
-rw-r--r--meta/packages/oprofile/oprofile/oparchive-exit-code-on-error.patch11
-rw-r--r--meta/packages/oprofile/oprofile/opreport-xml-output-fixes.patch199
-rw-r--r--meta/packages/oprofile/oprofile_cvs.bb2
3 files changed, 0 insertions, 212 deletions
diff --git a/meta/packages/oprofile/oprofile/oparchive-exit-code-on-error.patch b/meta/packages/oprofile/oprofile/oparchive-exit-code-on-error.patch
deleted file mode 100644
index ab4d7f4219..0000000000
--- a/meta/packages/oprofile/oprofile/oparchive-exit-code-on-error.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1Index: oprofile/pp/oparchive.cpp
2===================================================================
3--- oprofile.orig/pp/oparchive.cpp 2007-02-27 18:15:52.000000000 +0000
4+++ oprofile/pp/oparchive.cpp 2007-02-27 18:16:08.000000000 +0000
5@@ -164,5 +164,5 @@
6
7 int main(int argc, char const * argv[])
8 {
9- run_pp_tool(argc, argv, oparchive);
10+ return run_pp_tool(argc, argv, oparchive);
11 }
diff --git a/meta/packages/oprofile/oprofile/opreport-xml-output-fixes.patch b/meta/packages/oprofile/oprofile/opreport-xml-output-fixes.patch
deleted file mode 100644
index e53bceb912..0000000000
--- a/meta/packages/oprofile/oprofile/opreport-xml-output-fixes.patch
+++ /dev/null
@@ -1,199 +0,0 @@
1Index: oprofile/libpp/xml_utils.cpp
2===================================================================
3--- oprofile.orig/libpp/xml_utils.cpp 2007-02-13 17:34:31.000000000 +0000
4+++ oprofile/libpp/xml_utils.cpp 2007-02-13 17:35:06.000000000 +0000
5@@ -60,7 +60,7 @@
6 }
7
8
9-void dump_it(string const & prefix, sym_iterator it, bool want_nl = true)
10+void dump_symbol(string const & prefix, sym_iterator it, bool want_nl = true)
11 {
12 if (it == symbols_end)
13 cverb << vxml << prefix << "END";
14@@ -71,6 +71,17 @@
15 }
16
17
18+void dump_symbols(string const & prefix, sym_iterator b, sym_iterator e)
19+{
20+ if (b == (sym_iterator)0)
21+ return;
22+
23+ for (sym_iterator it = b; it != e; ++it)
24+ dump_symbol(prefix, it, true);
25+}
26+
27+
28+
29 void dump_classes()
30 {
31 cverb << vxml << "<!-- classes dump" << endl;
32@@ -425,6 +436,7 @@
33 void set_lo(size_t l) { lo = l; }
34 void set_hi(size_t h) { hi = h; }
35 count_array_t const & get_summary() { return summary; }
36+ void set_begin(sym_iterator b);
37 void set_end(sym_iterator e);
38 void add_to_summary(count_array_t const & counts);
39 void output(ostream & out);
40@@ -502,7 +514,7 @@
41 public:
42 binary_info() { nr_modules = 0; }
43 void output(ostream & out);
44- binary_info * build_binary(string const & n, sym_iterator it);
45+ binary_info * build_binary(string const & n);
46 void add_module_symbol(string const & module, string const & app,
47 sym_iterator it);
48 void close_binary(sym_iterator it);
49@@ -547,6 +559,14 @@
50 summary[pclass] += counts[pclass];
51 }
52
53+
54+void module_info::set_begin(sym_iterator b)
55+{
56+ if (begin == (sym_iterator)0)
57+ begin = b;
58+}
59+
60+
61 void module_info::set_end(sym_iterator e)
62 {
63 if (end == (sym_iterator)0)
64@@ -562,10 +582,9 @@
65
66 void module_info::dump()
67 {
68- cverb << vxml << "module:class(" << lo << "," << hi << ")=";
69+ cverb << vxml << " module:class(" << lo << "," << hi << ")=";
70 cverb << vxml << name << endl;
71- dump_it(" ", begin, false);
72- dump_it(" .. ", end-1);
73+ dump_symbols(" ", begin, end);
74 }
75
76
77@@ -588,6 +607,9 @@
78
79 void module_info::output_symbols(ostream & out)
80 {
81+ if (begin == (sym_iterator)0)
82+ return;
83+
84 for (sym_iterator it = begin; it != end; ++it)
85 xml_out->output_symbol(out, it, lo, hi);
86 }
87@@ -595,15 +617,13 @@
88
89 void binary_info::close_binary(sym_iterator it)
90 {
91+ set_end(it);
92 if (nr_modules > 0) {
93 module_info & m = my_modules[nr_modules-1];
94 m.set_end(it);
95
96 // propagate module summary to binary
97 add_to_summary(m.get_summary());
98- } else {
99- // close binary with no modules
100- set_end(it);
101 }
102 }
103
104@@ -611,6 +631,10 @@
105 void binary_info::dump()
106 {
107 cverb << vxml << "app_name=" << name << endl;
108+ if (begin != (sym_iterator)0) {
109+ dump_symbols(" ", begin, end);
110+ }
111+
112 for (size_t i = 0; i < nr_modules; ++i)
113 my_modules[i].dump();
114 }
115@@ -620,27 +644,41 @@
116 add_module_symbol(string const & module, string const & app,
117 sym_iterator it)
118 {
119+ size_t m = nr_modules;
120+
121 if (module == app) {
122+ // set begin symbol for binary if not set
123+ set_begin(it);
124+
125+ if (m > 0) {
126+ // close out current module
127+ module_info & mod = my_modules[m-1];
128+ mod.set_end(it);
129+ add_to_summary(mod.get_summary());
130+ }
131+
132 // no module, so add symbol count to binary count
133 add_to_summary((*it)->sample.counts);
134 return;
135 }
136
137- size_t m = nr_modules;
138 string current_module_name = (m == 0 ? "" : my_modules[m-1].get_name());
139 if (module != current_module_name) {
140 // we have a module distinct from it's binary: --separate=lib
141 // and this is the first symbol for this module
142- if (m == 0) {
143- // mark end of enclosing binary
144- end = it;
145- } else {
146+ if (m != 0) {
147 // close out current module
148 module_info & mod = my_modules[m-1];
149 mod.set_end(it);
150 add_to_summary(mod.get_summary());
151 }
152
153+ // mark end of enclosing binary symbols if there have been any
154+ // NOTE: it is possible for the binary's symbols to follow its
155+ // module symbols
156+ if (begin != (sym_iterator)0 && end == (sym_iterator)0)
157+ set_end(it);
158+
159 // build the new module
160 nr_modules++;
161 my_modules[m].build_module(module, it, 0, nr_classes-1);
162@@ -738,10 +776,9 @@
163 }
164
165 binary_info *
166-binary_info::build_binary(string const & n, sym_iterator it)
167+binary_info::build_binary(string const & n)
168 {
169 name = n;
170- begin = it;
171 lo = 0;
172 hi = nr_classes-1;
173 return this;
174@@ -755,7 +792,6 @@
175
176 output_summary(out);
177 output_symbols(out);
178-
179 for (size_t a = 0; a < nr_modules; ++a)
180 my_modules[a].output(out);
181
182@@ -770,7 +806,7 @@
183
184 // close out previous binary and module
185 if (a > 0) binaries[a-1].close_binary(it);
186- return binaries[a].build_binary(n, it);
187+ return binaries[a].build_binary(n);
188 }
189
190
191@@ -783,7 +819,7 @@
192
193 void binary_root_info::dump_binaries()
194 {
195- cverb << vxml << "<!-- processes_dump:" << endl;
196+ cverb << vxml << "<!-- binaries_dump:" << endl;
197 for (size_t p = 0; p < nr_binaries; ++p)
198 binaries[p].dump();
199 cverb << vxml << "end processes_dump -->" << endl;
diff --git a/meta/packages/oprofile/oprofile_cvs.bb b/meta/packages/oprofile/oprofile_cvs.bb
index 4c45709818..b0ccc3ce61 100644
--- a/meta/packages/oprofile/oprofile_cvs.bb
+++ b/meta/packages/oprofile/oprofile_cvs.bb
@@ -10,9 +10,7 @@ SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=
10 file://oprofile_eabi.patch;patch=1 \ 10 file://oprofile_eabi.patch;patch=1 \
11 file://oparchive-debug-dir.patch;patch=1 \ 11 file://oparchive-debug-dir.patch;patch=1 \
12 file://oparchive-list-files.patch;patch=1 \ 12 file://oparchive-list-files.patch;patch=1 \
13 file://opreport-xml-output-fixes.patch;patch=1 \
14 file://xml_callgraph.patch;patch=1 \ 13 file://xml_callgraph.patch;patch=1 \
15 file://oparchive-exit-code-on-error.patch;patch=1 \
16 file://acinclude.m4" 14 file://acinclude.m4"
17S = "${WORKDIR}/oprofile" 15S = "${WORKDIR}/oprofile"
18 16