diff options
author | Richard Purdie <richard@openedhand.com> | 2007-05-25 23:01:54 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-05-25 23:01:54 +0000 |
commit | 1fa7f838731998a125d6c7865309bd5e9852f1e0 (patch) | |
tree | 34faae368d54f3675c405559b185dca038b2121d /meta/packages | |
parent | 2b019e5f8b5b819cdcdbdcde129f68591faa731e (diff) | |
download | poky-1fa7f838731998a125d6c7865309bd5e9852f1e0.tar.gz |
nokia800: Add cx3110x to image
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1779 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r-- | meta/packages/oprofile/oprofile/xml_callgraph_details.patch | 232 | ||||
-rw-r--r-- | meta/packages/tasks/task-base.bb | 2 |
2 files changed, 233 insertions, 1 deletions
diff --git a/meta/packages/oprofile/oprofile/xml_callgraph_details.patch b/meta/packages/oprofile/oprofile/xml_callgraph_details.patch new file mode 100644 index 0000000000..e5ab3d916e --- /dev/null +++ b/meta/packages/oprofile/oprofile/xml_callgraph_details.patch | |||
@@ -0,0 +1,232 @@ | |||
1 | Work in Progress- This patch breaks output_symbol_bytes | ||
2 | --- | ||
3 | ChangeLog | 9 +++++++++ | ||
4 | libpp/callgraph_container.cpp | 10 ++++++++-- | ||
5 | libpp/callgraph_container.h | 14 ++++++++++---- | ||
6 | libpp/format_output.cpp | 30 +++++++++++++++++++++++++----- | ||
7 | libpp/format_output.h | 6 +++--- | ||
8 | pp/opreport.cpp | 5 +++-- | ||
9 | pp/opreport_options.cpp | 4 ++-- | ||
10 | 7 files changed, 60 insertions(+), 18 deletions(-) | ||
11 | |||
12 | Index: oprofile1/pp/opreport.cpp | ||
13 | =================================================================== | ||
14 | --- oprofile1.orig/pp/opreport.cpp 2007-05-24 15:32:20.000000000 +0100 | ||
15 | +++ oprofile1/pp/opreport.cpp 2007-05-24 20:07:14.000000000 +0100 | ||
16 | @@ -555,10 +555,11 @@ int opreport(options::spec const & spec) | ||
17 | |||
18 | output_diff_symbols(pc1, pc2, multiple_apps); | ||
19 | } else if (options::callgraph) { | ||
20 | - callgraph_container cg_container; | ||
21 | + callgraph_container cg_container(options::debug_info, | ||
22 | + options::details); | ||
23 | cg_container.populate(options::archive_path, iprofiles, | ||
24 | options::extra_found_images, | ||
25 | - options::debug_info, options::threshold, | ||
26 | + options::threshold, | ||
27 | options::merge_by.lib, options::symbol_filter); | ||
28 | |||
29 | output_cg_symbols(cg_container, multiple_apps); | ||
30 | Index: oprofile1/ChangeLog | ||
31 | =================================================================== | ||
32 | --- oprofile1.orig/ChangeLog 2007-05-24 18:30:47.000000000 +0100 | ||
33 | +++ oprofile1/ChangeLog 2007-05-24 20:07:14.000000000 +0100 | ||
34 | @@ -1,5 +1,14 @@ | ||
35 | 2007-05-24 Richard Purdie <rpurdie@openedhand.com> | ||
36 | |||
37 | + * libpp/callgraph_container.cpp: | ||
38 | + * libpp/callgraph_container.h: | ||
39 | + * libpp/format_output.cpp: | ||
40 | + * libpp/format_output.h: | ||
41 | + * pp/opreport.cpp: | ||
42 | + * pp/opreport_options.cpp: Add callgraph XML detail support | ||
43 | + | ||
44 | +2007-05-24 Richard Purdie <rpurdie@openedhand.com> | ||
45 | + | ||
46 | * events/arm/xscale1/events: | ||
47 | * events/arm/xscale2/events: Add extra Xscale PMU event definitions | ||
48 | |||
49 | Index: oprofile1/libpp/callgraph_container.cpp | ||
50 | =================================================================== | ||
51 | --- oprofile1.orig/libpp/callgraph_container.cpp 2007-05-24 15:32:20.000000000 +0100 | ||
52 | +++ oprofile1/libpp/callgraph_container.cpp 2007-05-24 20:07:14.000000000 +0100 | ||
53 | @@ -391,15 +391,21 @@ const symbol_collection & arc_recorder:: | ||
54 | return cg_syms; | ||
55 | } | ||
56 | |||
57 | +callgraph_container::callgraph_container(bool debug_info, bool need_details) | ||
58 | + : | ||
59 | + pc(debug_info, need_details), | ||
60 | + debug_info(debug_info) | ||
61 | +{ | ||
62 | +} | ||
63 | + | ||
64 | |||
65 | void callgraph_container::populate(string const & archive_path, | ||
66 | list<inverted_profile> const & iprofiles, | ||
67 | - extra_images const & extra, bool debug_info, double threshold, | ||
68 | + extra_images const & extra, double threshold, | ||
69 | bool merge_lib, string_filter const & sym_filter) | ||
70 | { | ||
71 | // non callgraph samples container, we record sample at symbol level | ||
72 | // not at vma level. | ||
73 | - profile_container pc(debug_info, false); | ||
74 | |||
75 | list<inverted_profile>::const_iterator it; | ||
76 | list<inverted_profile>::const_iterator const end = iprofiles.end(); | ||
77 | Index: oprofile1/libpp/callgraph_container.h | ||
78 | =================================================================== | ||
79 | --- oprofile1.orig/libpp/callgraph_container.h 2007-05-24 15:32:20.000000000 +0100 | ||
80 | +++ oprofile1/libpp/callgraph_container.h 2007-05-24 20:07:14.000000000 +0100 | ||
81 | @@ -19,8 +19,8 @@ | ||
82 | #include "symbol.h" | ||
83 | #include "symbol_functors.h" | ||
84 | #include "string_filter.h" | ||
85 | +#include "profile_container.h" | ||
86 | |||
87 | -class profile_container; | ||
88 | class inverted_profile; | ||
89 | class profile_t; | ||
90 | class extra_images; | ||
91 | @@ -103,6 +103,8 @@ private: | ||
92 | */ | ||
93 | class callgraph_container { | ||
94 | public: | ||
95 | + callgraph_container(bool debug_info, bool need_details); | ||
96 | + | ||
97 | /** | ||
98 | * Populate the container, must be called once only. | ||
99 | * @param archive_path oparchive prefix path | ||
100 | @@ -118,9 +120,8 @@ public: | ||
101 | */ | ||
102 | void populate(std::string const & archive_path, | ||
103 | std::list<inverted_profile> const & iprofiles, | ||
104 | - extra_images const & extra, bool debug_info, | ||
105 | - double threshold, bool merge_lib, | ||
106 | - string_filter const & sym_filter); | ||
107 | + extra_images const & extra, double threshold, | ||
108 | + bool merge_lib, string_filter const & sym_filter); | ||
109 | |||
110 | /// return hint on how data must be displayed. | ||
111 | column_flags output_hint() const; | ||
112 | @@ -131,6 +132,9 @@ public: | ||
113 | // return all the cg symbols | ||
114 | const symbol_collection & get_symbols() const; | ||
115 | |||
116 | + // profile container callgraph is based on | ||
117 | + profile_container pc; | ||
118 | + | ||
119 | private: | ||
120 | /** | ||
121 | * Record caller/callee for one cg file | ||
122 | @@ -162,6 +166,8 @@ private: | ||
123 | profile_container const & pc, bool debug_info, | ||
124 | bool merge_lib); | ||
125 | |||
126 | + bool debug_info; | ||
127 | + | ||
128 | /// record all main symbols | ||
129 | void add_symbols(profile_container const & pc); | ||
130 | |||
131 | Index: oprofile1/pp/opreport_options.cpp | ||
132 | =================================================================== | ||
133 | --- oprofile1.orig/pp/opreport_options.cpp 2007-05-24 15:32:20.000000000 +0100 | ||
134 | +++ oprofile1/pp/opreport_options.cpp 2007-05-24 20:07:14.000000000 +0100 | ||
135 | @@ -165,8 +165,8 @@ void check_options(bool diff) | ||
136 | |||
137 | if (callgraph) { | ||
138 | symbols = true; | ||
139 | - if (details) { | ||
140 | - cerr << "--callgraph is incompatible with --details" << endl; | ||
141 | + if (details && !xml) { | ||
142 | + cerr << "--callgraph is incompatible with --details without --xml" << endl; | ||
143 | do_exit = true; | ||
144 | } | ||
145 | |||
146 | Index: oprofile1/libpp/format_output.cpp | ||
147 | =================================================================== | ||
148 | --- oprofile1.orig/libpp/format_output.cpp 2007-05-24 15:32:20.000000000 +0100 | ||
149 | +++ oprofile1/libpp/format_output.cpp 2007-05-24 20:07:14.000000000 +0100 | ||
150 | @@ -594,9 +594,9 @@ xml_formatter:: | ||
151 | xml_formatter(profile_container const * p, | ||
152 | symbol_collection & s) | ||
153 | : | ||
154 | + need_details(false), | ||
155 | profile(p), | ||
156 | - symbols(s), | ||
157 | - need_details(false) | ||
158 | + symbols(s) | ||
159 | { | ||
160 | if (profile) | ||
161 | counts.total = profile->samples_count(); | ||
162 | @@ -673,8 +673,8 @@ void xml_formatter::output_symbol_data(o | ||
163 | if (name.size() > 0 && name[0] != '?') { | ||
164 | output_attribute(out, datum, ff_vma, STARTING_ADDR); | ||
165 | |||
166 | - if (need_details) | ||
167 | - xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second); | ||
168 | + //if (need_details) | ||
169 | + // xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second); | ||
170 | } | ||
171 | out << close_element(); | ||
172 | |||
173 | @@ -843,7 +843,7 @@ output_attribute(ostream & out, field_da | ||
174 | xml_cg_formatter:: | ||
175 | xml_cg_formatter(callgraph_container const * cg, symbol_collection & s) | ||
176 | : | ||
177 | - xml_formatter(0, s), | ||
178 | + xml_formatter(&cg->pc, s), | ||
179 | callgraph(cg) | ||
180 | { | ||
181 | counts.total = callgraph->samples_count(); | ||
182 | @@ -946,6 +946,26 @@ output_symbol(ostream & out, | ||
183 | |||
184 | out << init_attr(ID_REF, indx); | ||
185 | |||
186 | + if (need_details) { | ||
187 | + ostringstream details; | ||
188 | + symbol_details_t & sd = symbol_details[indx]; | ||
189 | + size_t const detail_lo = sd.index; | ||
190 | + | ||
191 | + string detail_str = output_symbol_details(symb, sd.index, lo, hi); | ||
192 | + | ||
193 | + if (detail_str.size() > 0) { | ||
194 | + if (sd.id < 0) | ||
195 | + sd.id = indx; | ||
196 | + details << detail_str; | ||
197 | + } | ||
198 | + | ||
199 | + if (sd.index > detail_lo) { | ||
200 | + sd.details = sd.details + details.str(); | ||
201 | + out << init_attr(DETAIL_LO, detail_lo); | ||
202 | + out << init_attr(DETAIL_HI, sd.index-1); | ||
203 | + } | ||
204 | + } | ||
205 | + | ||
206 | out << close_element(NONE, true); | ||
207 | |||
208 | out << open_element(CALLERS); | ||
209 | Index: oprofile1/libpp/format_output.h | ||
210 | =================================================================== | ||
211 | --- oprofile1.orig/libpp/format_output.h 2007-05-24 15:32:20.000000000 +0100 | ||
212 | +++ oprofile1/libpp/format_output.h 2007-05-24 20:07:14.000000000 +0100 | ||
213 | @@ -249,6 +249,9 @@ public: | ||
214 | // output SymbolData XML elements | ||
215 | void output_symbol_data(std::ostream & out); | ||
216 | |||
217 | + /// true if we need to show details for each symbols | ||
218 | + bool need_details; | ||
219 | + | ||
220 | private: | ||
221 | /// container we work from | ||
222 | profile_container const * profile; | ||
223 | @@ -256,9 +259,6 @@ private: | ||
224 | // ordered collection of symbols associated with this profile | ||
225 | symbol_collection & symbols; | ||
226 | |||
227 | - /// true if we need to show details for each symbols | ||
228 | - bool need_details; | ||
229 | - | ||
230 | // count of DetailData items output so far | ||
231 | size_t detail_count; | ||
232 | |||
diff --git a/meta/packages/tasks/task-base.bb b/meta/packages/tasks/task-base.bb index 8d8e884ac5..49aaa595f3 100644 --- a/meta/packages/tasks/task-base.bb +++ b/meta/packages/tasks/task-base.bb | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | DESCRIPTION = "Merge machine and distro options to create a basic machine task/package" | 5 | DESCRIPTION = "Merge machine and distro options to create a basic machine task/package" |
6 | PR = "r4" | 6 | PR = "r5" |
7 | 7 | ||
8 | PACKAGES = "task-base \ | 8 | PACKAGES = "task-base \ |
9 | task-base-oh-minimal" | 9 | task-base-oh-minimal" |