Commit | Line | Data |
---|---|---|
7ccf4f90 | 1 | #include <stdio.h> |
7ccf4f90 NK |
2 | |
3 | #include "../../util/util.h" | |
4 | #include "../../util/hist.h" | |
5 | #include "../../util/sort.h" | |
5b9e2146 | 6 | #include "../../util/evsel.h" |
7ccf4f90 NK |
7 | |
8 | ||
9 | static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin) | |
10 | { | |
11 | int i; | |
12 | int ret = fprintf(fp, " "); | |
13 | ||
14 | for (i = 0; i < left_margin; i++) | |
15 | ret += fprintf(fp, " "); | |
16 | ||
17 | return ret; | |
18 | } | |
19 | ||
20 | static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask, | |
21 | int left_margin) | |
22 | { | |
23 | int i; | |
24 | size_t ret = callchain__fprintf_left_margin(fp, left_margin); | |
25 | ||
26 | for (i = 0; i < depth; i++) | |
27 | if (depth_mask & (1 << i)) | |
28 | ret += fprintf(fp, "| "); | |
29 | else | |
30 | ret += fprintf(fp, " "); | |
31 | ||
32 | ret += fprintf(fp, "\n"); | |
33 | ||
34 | return ret; | |
35 | } | |
36 | ||
5ab250ca NK |
37 | static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_node *node, |
38 | struct callchain_list *chain, | |
7ccf4f90 | 39 | int depth, int depth_mask, int period, |
5ab250ca | 40 | u64 total_samples, int left_margin) |
7ccf4f90 NK |
41 | { |
42 | int i; | |
43 | size_t ret = 0; | |
2989ccaa | 44 | char bf[1024]; |
7ccf4f90 NK |
45 | |
46 | ret += callchain__fprintf_left_margin(fp, left_margin); | |
47 | for (i = 0; i < depth; i++) { | |
48 | if (depth_mask & (1 << i)) | |
49 | ret += fprintf(fp, "|"); | |
50 | else | |
51 | ret += fprintf(fp, " "); | |
52 | if (!period && i == depth - 1) { | |
5ab250ca NK |
53 | ret += fprintf(fp, "--"); |
54 | ret += callchain_node__fprintf_value(node, fp, total_samples); | |
55 | ret += fprintf(fp, "--"); | |
7ccf4f90 NK |
56 | } else |
57 | ret += fprintf(fp, "%s", " "); | |
58 | } | |
2989ccaa AK |
59 | fputs(callchain_list__sym_name(chain, bf, sizeof(bf), false), fp); |
60 | fputc('\n', fp); | |
7ccf4f90 NK |
61 | return ret; |
62 | } | |
63 | ||
64 | static struct symbol *rem_sq_bracket; | |
65 | static struct callchain_list rem_hits; | |
66 | ||
67 | static void init_rem_hits(void) | |
68 | { | |
69 | rem_sq_bracket = malloc(sizeof(*rem_sq_bracket) + 6); | |
70 | if (!rem_sq_bracket) { | |
71 | fprintf(stderr, "Not enough memory to display remaining hits\n"); | |
72 | return; | |
73 | } | |
74 | ||
75 | strcpy(rem_sq_bracket->name, "[...]"); | |
76 | rem_hits.ms.sym = rem_sq_bracket; | |
77 | } | |
78 | ||
79 | static size_t __callchain__fprintf_graph(FILE *fp, struct rb_root *root, | |
80 | u64 total_samples, int depth, | |
81 | int depth_mask, int left_margin) | |
82 | { | |
83 | struct rb_node *node, *next; | |
84 | struct callchain_node *child; | |
85 | struct callchain_list *chain; | |
86 | int new_depth_mask = depth_mask; | |
87 | u64 remaining; | |
88 | size_t ret = 0; | |
89 | int i; | |
90 | uint entries_printed = 0; | |
91 | ||
92 | remaining = total_samples; | |
93 | ||
94 | node = rb_first(root); | |
95 | while (node) { | |
96 | u64 new_total; | |
97 | u64 cumul; | |
98 | ||
99 | child = rb_entry(node, struct callchain_node, rb_node); | |
100 | cumul = callchain_cumul_hits(child); | |
101 | remaining -= cumul; | |
102 | ||
103 | /* | |
104 | * The depth mask manages the output of pipes that show | |
105 | * the depth. We don't want to keep the pipes of the current | |
106 | * level for the last child of this depth. | |
107 | * Except if we have remaining filtered hits. They will | |
108 | * supersede the last child | |
109 | */ | |
110 | next = rb_next(node); | |
111 | if (!next && (callchain_param.mode != CHAIN_GRAPH_REL || !remaining)) | |
112 | new_depth_mask &= ~(1 << (depth - 1)); | |
113 | ||
114 | /* | |
115 | * But we keep the older depth mask for the line separator | |
116 | * to keep the level link until we reach the last child | |
117 | */ | |
118 | ret += ipchain__fprintf_graph_line(fp, depth, depth_mask, | |
119 | left_margin); | |
120 | i = 0; | |
121 | list_for_each_entry(chain, &child->val, list) { | |
5ab250ca | 122 | ret += ipchain__fprintf_graph(fp, child, chain, depth, |
7ccf4f90 NK |
123 | new_depth_mask, i++, |
124 | total_samples, | |
7ccf4f90 NK |
125 | left_margin); |
126 | } | |
127 | ||
128 | if (callchain_param.mode == CHAIN_GRAPH_REL) | |
129 | new_total = child->children_hit; | |
130 | else | |
131 | new_total = total_samples; | |
132 | ||
133 | ret += __callchain__fprintf_graph(fp, &child->rb_root, new_total, | |
134 | depth + 1, | |
135 | new_depth_mask | (1 << depth), | |
136 | left_margin); | |
137 | node = next; | |
138 | if (++entries_printed == callchain_param.print_limit) | |
139 | break; | |
140 | } | |
141 | ||
142 | if (callchain_param.mode == CHAIN_GRAPH_REL && | |
143 | remaining && remaining != total_samples) { | |
5ab250ca NK |
144 | struct callchain_node rem_node = { |
145 | .hit = remaining, | |
146 | }; | |
7ccf4f90 NK |
147 | |
148 | if (!rem_sq_bracket) | |
149 | return ret; | |
150 | ||
151 | new_depth_mask &= ~(1 << (depth - 1)); | |
5ab250ca | 152 | ret += ipchain__fprintf_graph(fp, &rem_node, &rem_hits, depth, |
7ccf4f90 | 153 | new_depth_mask, 0, total_samples, |
5ab250ca | 154 | left_margin); |
7ccf4f90 NK |
155 | } |
156 | ||
157 | return ret; | |
158 | } | |
159 | ||
160 | static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root, | |
161 | u64 total_samples, int left_margin) | |
162 | { | |
163 | struct callchain_node *cnode; | |
164 | struct callchain_list *chain; | |
165 | u32 entries_printed = 0; | |
166 | bool printed = false; | |
167 | struct rb_node *node; | |
168 | int i = 0; | |
169 | int ret = 0; | |
2989ccaa | 170 | char bf[1024]; |
7ccf4f90 NK |
171 | |
172 | /* | |
173 | * If have one single callchain root, don't bother printing | |
174 | * its percentage (100 % in fractal mode and the same percentage | |
175 | * than the hist in graph mode). This also avoid one level of column. | |
176 | */ | |
177 | node = rb_first(root); | |
178 | if (node && !rb_next(node)) { | |
179 | cnode = rb_entry(node, struct callchain_node, rb_node); | |
180 | list_for_each_entry(chain, &cnode->val, list) { | |
181 | /* | |
182 | * If we sort by symbol, the first entry is the same than | |
183 | * the symbol. No need to print it otherwise it appears as | |
184 | * displayed twice. | |
185 | */ | |
cfaa154b NK |
186 | if (!i++ && field_order == NULL && |
187 | sort_order && !prefixcmp(sort_order, "sym")) | |
7ccf4f90 NK |
188 | continue; |
189 | if (!printed) { | |
190 | ret += callchain__fprintf_left_margin(fp, left_margin); | |
191 | ret += fprintf(fp, "|\n"); | |
192 | ret += callchain__fprintf_left_margin(fp, left_margin); | |
193 | ret += fprintf(fp, "---"); | |
194 | left_margin += 3; | |
195 | printed = true; | |
196 | } else | |
197 | ret += callchain__fprintf_left_margin(fp, left_margin); | |
198 | ||
2989ccaa AK |
199 | ret += fprintf(fp, "%s\n", callchain_list__sym_name(chain, bf, sizeof(bf), |
200 | false)); | |
7ccf4f90 NK |
201 | |
202 | if (++entries_printed == callchain_param.print_limit) | |
203 | break; | |
204 | } | |
205 | root = &cnode->rb_root; | |
206 | } | |
207 | ||
208 | ret += __callchain__fprintf_graph(fp, root, total_samples, | |
209 | 1, 1, left_margin); | |
210 | ret += fprintf(fp, "\n"); | |
211 | ||
212 | return ret; | |
213 | } | |
214 | ||
316c7136 | 215 | static size_t __callchain__fprintf_flat(FILE *fp, struct callchain_node *node, |
7ccf4f90 NK |
216 | u64 total_samples) |
217 | { | |
218 | struct callchain_list *chain; | |
219 | size_t ret = 0; | |
2989ccaa | 220 | char bf[1024]; |
7ccf4f90 | 221 | |
316c7136 | 222 | if (!node) |
7ccf4f90 NK |
223 | return 0; |
224 | ||
316c7136 | 225 | ret += __callchain__fprintf_flat(fp, node->parent, total_samples); |
7ccf4f90 NK |
226 | |
227 | ||
316c7136 | 228 | list_for_each_entry(chain, &node->val, list) { |
7ccf4f90 NK |
229 | if (chain->ip >= PERF_CONTEXT_MAX) |
230 | continue; | |
2989ccaa AK |
231 | ret += fprintf(fp, " %s\n", callchain_list__sym_name(chain, |
232 | bf, sizeof(bf), false)); | |
7ccf4f90 NK |
233 | } |
234 | ||
235 | return ret; | |
236 | } | |
237 | ||
316c7136 | 238 | static size_t callchain__fprintf_flat(FILE *fp, struct rb_root *tree, |
7ccf4f90 NK |
239 | u64 total_samples) |
240 | { | |
241 | size_t ret = 0; | |
242 | u32 entries_printed = 0; | |
7ccf4f90 | 243 | struct callchain_node *chain; |
316c7136 | 244 | struct rb_node *rb_node = rb_first(tree); |
7ccf4f90 | 245 | |
7ccf4f90 | 246 | while (rb_node) { |
7ccf4f90 | 247 | chain = rb_entry(rb_node, struct callchain_node, rb_node); |
7ccf4f90 | 248 | |
5ab250ca NK |
249 | ret += fprintf(fp, " "); |
250 | ret += callchain_node__fprintf_value(chain, fp, total_samples); | |
251 | ret += fprintf(fp, "\n"); | |
7ccf4f90 NK |
252 | ret += __callchain__fprintf_flat(fp, chain, total_samples); |
253 | ret += fprintf(fp, "\n"); | |
254 | if (++entries_printed == callchain_param.print_limit) | |
255 | break; | |
256 | ||
257 | rb_node = rb_next(rb_node); | |
258 | } | |
259 | ||
260 | return ret; | |
261 | } | |
262 | ||
26e77924 NK |
263 | static size_t __callchain__fprintf_folded(FILE *fp, struct callchain_node *node) |
264 | { | |
265 | const char *sep = symbol_conf.field_sep ?: ";"; | |
266 | struct callchain_list *chain; | |
267 | size_t ret = 0; | |
268 | char bf[1024]; | |
269 | bool first; | |
270 | ||
271 | if (!node) | |
272 | return 0; | |
273 | ||
274 | ret += __callchain__fprintf_folded(fp, node->parent); | |
275 | ||
276 | first = (ret == 0); | |
277 | list_for_each_entry(chain, &node->val, list) { | |
278 | if (chain->ip >= PERF_CONTEXT_MAX) | |
279 | continue; | |
280 | ret += fprintf(fp, "%s%s", first ? "" : sep, | |
281 | callchain_list__sym_name(chain, | |
282 | bf, sizeof(bf), false)); | |
283 | first = false; | |
284 | } | |
285 | ||
286 | return ret; | |
287 | } | |
288 | ||
289 | static size_t callchain__fprintf_folded(FILE *fp, struct rb_root *tree, | |
290 | u64 total_samples) | |
291 | { | |
292 | size_t ret = 0; | |
293 | u32 entries_printed = 0; | |
294 | struct callchain_node *chain; | |
295 | struct rb_node *rb_node = rb_first(tree); | |
296 | ||
297 | while (rb_node) { | |
26e77924 NK |
298 | |
299 | chain = rb_entry(rb_node, struct callchain_node, rb_node); | |
26e77924 | 300 | |
5ab250ca NK |
301 | ret += callchain_node__fprintf_value(chain, fp, total_samples); |
302 | ret += fprintf(fp, " "); | |
26e77924 NK |
303 | ret += __callchain__fprintf_folded(fp, chain); |
304 | ret += fprintf(fp, "\n"); | |
305 | if (++entries_printed == callchain_param.print_limit) | |
306 | break; | |
307 | ||
308 | rb_node = rb_next(rb_node); | |
309 | } | |
310 | ||
311 | return ret; | |
312 | } | |
313 | ||
7ccf4f90 NK |
314 | static size_t hist_entry_callchain__fprintf(struct hist_entry *he, |
315 | u64 total_samples, int left_margin, | |
316 | FILE *fp) | |
317 | { | |
318 | switch (callchain_param.mode) { | |
319 | case CHAIN_GRAPH_REL: | |
56772ad4 NK |
320 | return callchain__fprintf_graph(fp, &he->sorted_chain, |
321 | symbol_conf.cumulate_callchain ? | |
322 | he->stat_acc->period : he->stat.period, | |
7ccf4f90 NK |
323 | left_margin); |
324 | break; | |
325 | case CHAIN_GRAPH_ABS: | |
326 | return callchain__fprintf_graph(fp, &he->sorted_chain, total_samples, | |
327 | left_margin); | |
328 | break; | |
329 | case CHAIN_FLAT: | |
330 | return callchain__fprintf_flat(fp, &he->sorted_chain, total_samples); | |
331 | break; | |
26e77924 NK |
332 | case CHAIN_FOLDED: |
333 | return callchain__fprintf_folded(fp, &he->sorted_chain, total_samples); | |
334 | break; | |
7ccf4f90 NK |
335 | case CHAIN_NONE: |
336 | break; | |
337 | default: | |
338 | pr_err("Bad callchain mode\n"); | |
339 | } | |
340 | ||
341 | return 0; | |
342 | } | |
343 | ||
000078bc NK |
344 | static size_t hist_entry__callchain_fprintf(struct hist_entry *he, |
345 | struct hists *hists, | |
b5ff71c3 | 346 | FILE *fp) |
000078bc NK |
347 | { |
348 | int left_margin = 0; | |
b5ff71c3 | 349 | u64 total_period = hists->stats.total_period; |
000078bc | 350 | |
cfaa154b NK |
351 | if (field_order == NULL && (sort_order == NULL || |
352 | !prefixcmp(sort_order, "comm"))) { | |
353 | struct perf_hpp_fmt *fmt; | |
354 | ||
355 | perf_hpp__for_each_format(fmt) { | |
356 | if (!perf_hpp__is_sort_entry(fmt)) | |
357 | continue; | |
000078bc | 358 | |
cfaa154b NK |
359 | /* must be 'comm' sort entry */ |
360 | left_margin = fmt->width(fmt, NULL, hists_to_evsel(hists)); | |
361 | left_margin -= thread__comm_len(he->thread); | |
362 | break; | |
363 | } | |
364 | } | |
000078bc NK |
365 | return hist_entry_callchain__fprintf(he, total_period, left_margin, fp); |
366 | } | |
367 | ||
26d8b338 | 368 | static int hist_entry__snprintf(struct hist_entry *he, struct perf_hpp *hpp) |
be0e6d10 JO |
369 | { |
370 | const char *sep = symbol_conf.field_sep; | |
371 | struct perf_hpp_fmt *fmt; | |
372 | char *start = hpp->buf; | |
373 | int ret; | |
374 | bool first = true; | |
375 | ||
376 | if (symbol_conf.exclude_other && !he->parent) | |
377 | return 0; | |
378 | ||
379 | perf_hpp__for_each_format(fmt) { | |
e67d49a7 NK |
380 | if (perf_hpp__should_skip(fmt)) |
381 | continue; | |
382 | ||
be0e6d10 JO |
383 | /* |
384 | * If there's no field_sep, we still need | |
385 | * to display initial ' '. | |
386 | */ | |
387 | if (!sep || !first) { | |
388 | ret = scnprintf(hpp->buf, hpp->size, "%s", sep ?: " "); | |
389 | advance_hpp(hpp, ret); | |
390 | } else | |
391 | first = false; | |
392 | ||
9754c4f9 | 393 | if (perf_hpp__use_color() && fmt->color) |
be0e6d10 JO |
394 | ret = fmt->color(fmt, hpp, he); |
395 | else | |
396 | ret = fmt->entry(fmt, hpp, he); | |
397 | ||
398 | advance_hpp(hpp, ret); | |
399 | } | |
400 | ||
401 | return hpp->buf - start; | |
402 | } | |
403 | ||
7ccf4f90 | 404 | static int hist_entry__fprintf(struct hist_entry *he, size_t size, |
99cf666c ACM |
405 | struct hists *hists, |
406 | char *bf, size_t bfsz, FILE *fp) | |
7ccf4f90 | 407 | { |
7ccf4f90 | 408 | int ret; |
ea251d51 NK |
409 | struct perf_hpp hpp = { |
410 | .buf = bf, | |
411 | .size = size, | |
ea251d51 | 412 | }; |
7ccf4f90 | 413 | |
99cf666c ACM |
414 | if (size == 0 || size > bfsz) |
415 | size = hpp.size = bfsz; | |
7ccf4f90 | 416 | |
26d8b338 | 417 | hist_entry__snprintf(he, &hpp); |
7ccf4f90 | 418 | |
000078bc | 419 | ret = fprintf(fp, "%s\n", bf); |
7ccf4f90 | 420 | |
000078bc | 421 | if (symbol_conf.use_callchain) |
b5ff71c3 | 422 | ret += hist_entry__callchain_fprintf(he, hists, fp); |
7ccf4f90 | 423 | |
000078bc | 424 | return ret; |
7ccf4f90 NK |
425 | } |
426 | ||
41724e4c | 427 | size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, |
064f1981 | 428 | int max_cols, float min_pcnt, FILE *fp) |
7ccf4f90 | 429 | { |
1240005e | 430 | struct perf_hpp_fmt *fmt; |
7ccf4f90 NK |
431 | struct rb_node *nd; |
432 | size_t ret = 0; | |
7ccf4f90 NK |
433 | unsigned int width; |
434 | const char *sep = symbol_conf.field_sep; | |
1240005e | 435 | int nr_rows = 0; |
ed279da2 | 436 | char bf[96]; |
ea251d51 NK |
437 | struct perf_hpp dummy_hpp = { |
438 | .buf = bf, | |
439 | .size = sizeof(bf), | |
ea251d51 | 440 | }; |
5395a048 | 441 | bool first = true; |
99cf666c ACM |
442 | size_t linesz; |
443 | char *line = NULL; | |
7ccf4f90 NK |
444 | |
445 | init_rem_hits(); | |
446 | ||
678a500d NK |
447 | perf_hpp__for_each_format(fmt) |
448 | perf_hpp__reset_width(fmt, hists); | |
26d8b338 | 449 | |
5b591669 NK |
450 | if (symbol_conf.col_width_list_str) |
451 | perf_hpp__set_user_width(symbol_conf.col_width_list_str); | |
452 | ||
26d8b338 NK |
453 | if (!show_header) |
454 | goto print_entries; | |
455 | ||
456 | fprintf(fp, "# "); | |
457 | ||
458 | perf_hpp__for_each_format(fmt) { | |
e67d49a7 NK |
459 | if (perf_hpp__should_skip(fmt)) |
460 | continue; | |
461 | ||
26d8b338 NK |
462 | if (!first) |
463 | fprintf(fp, "%s", sep ?: " "); | |
464 | else | |
465 | first = false; | |
466 | ||
467 | fmt->header(fmt, &dummy_hpp, hists_to_evsel(hists)); | |
468 | fprintf(fp, "%s", bf); | |
7ccf4f90 NK |
469 | } |
470 | ||
471 | fprintf(fp, "\n"); | |
472 | if (max_rows && ++nr_rows >= max_rows) | |
473 | goto out; | |
474 | ||
475 | if (sep) | |
476 | goto print_entries; | |
477 | ||
5395a048 JO |
478 | first = true; |
479 | ||
ea251d51 | 480 | fprintf(fp, "# "); |
ea251d51 | 481 | |
1240005e JO |
482 | perf_hpp__for_each_format(fmt) { |
483 | unsigned int i; | |
ea251d51 | 484 | |
e67d49a7 NK |
485 | if (perf_hpp__should_skip(fmt)) |
486 | continue; | |
487 | ||
5395a048 | 488 | if (!first) |
ea251d51 | 489 | fprintf(fp, "%s", sep ?: " "); |
5395a048 JO |
490 | else |
491 | first = false; | |
ea251d51 | 492 | |
94a0793d | 493 | width = fmt->width(fmt, &dummy_hpp, hists_to_evsel(hists)); |
ea251d51 NK |
494 | for (i = 0; i < width; i++) |
495 | fprintf(fp, "."); | |
7ccf4f90 | 496 | } |
ea251d51 | 497 | |
7ccf4f90 NK |
498 | fprintf(fp, "\n"); |
499 | if (max_rows && ++nr_rows >= max_rows) | |
500 | goto out; | |
501 | ||
502 | fprintf(fp, "#\n"); | |
503 | if (max_rows && ++nr_rows >= max_rows) | |
504 | goto out; | |
505 | ||
506 | print_entries: | |
99cf666c | 507 | linesz = hists__sort_list_width(hists) + 3 + 1; |
9754c4f9 | 508 | linesz += perf_hpp__color_overhead(); |
99cf666c ACM |
509 | line = malloc(linesz); |
510 | if (line == NULL) { | |
511 | ret = -1; | |
512 | goto out; | |
513 | } | |
514 | ||
7ccf4f90 NK |
515 | for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) { |
516 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); | |
14135663 | 517 | float percent; |
7ccf4f90 NK |
518 | |
519 | if (h->filtered) | |
520 | continue; | |
521 | ||
14135663 | 522 | percent = hist_entry__get_percent_limit(h); |
064f1981 NK |
523 | if (percent < min_pcnt) |
524 | continue; | |
525 | ||
99cf666c | 526 | ret += hist_entry__fprintf(h, max_cols, hists, line, linesz, fp); |
7ccf4f90 | 527 | |
7ccf4f90 | 528 | if (max_rows && ++nr_rows >= max_rows) |
99cf666c | 529 | break; |
7ccf4f90 NK |
530 | |
531 | if (h->ms.map == NULL && verbose > 1) { | |
93d5731d | 532 | __map_groups__fprintf_maps(h->thread->mg, |
acebd408 | 533 | MAP__FUNCTION, fp); |
7ccf4f90 NK |
534 | fprintf(fp, "%.10s end\n", graph_dotted_line); |
535 | } | |
536 | } | |
99cf666c ACM |
537 | |
538 | free(line); | |
7ccf4f90 | 539 | out: |
74cf249d | 540 | zfree(&rem_sq_bracket); |
7ccf4f90 NK |
541 | |
542 | return ret; | |
543 | } | |
544 | ||
52168eea | 545 | size_t events_stats__fprintf(struct events_stats *stats, FILE *fp) |
7ccf4f90 NK |
546 | { |
547 | int i; | |
548 | size_t ret = 0; | |
549 | ||
550 | for (i = 0; i < PERF_RECORD_HEADER_MAX; ++i) { | |
551 | const char *name; | |
552 | ||
52168eea | 553 | if (stats->nr_events[i] == 0) |
7ccf4f90 NK |
554 | continue; |
555 | ||
556 | name = perf_event__name(i); | |
557 | if (!strcmp(name, "UNKNOWN")) | |
558 | continue; | |
559 | ||
560 | ret += fprintf(fp, "%16s events: %10d\n", name, | |
52168eea | 561 | stats->nr_events[i]); |
7ccf4f90 NK |
562 | } |
563 | ||
564 | return ret; | |
565 | } |