blob: cb395715d13c18edfb9cfbc05ed2f6dad94956bc [file] [log] [blame]
Mike Dodd8cfa7022010-11-17 11:12:26 -08001/**
2 * @file symbol.cpp
3 * Symbol containers
4 *
5 * @remark Copyright 2002, 2004 OProfile authors
6 * @remark Read the file COPYING
7 *
8 * @author Philippe Elie
9 * @author John Levon
10 */
11
12
13#include "symbol.h"
14#include "locate_images.h"
15
16#include <iostream>
17#include <string>
18
19using namespace std;
20
21column_flags symbol_entry::output_hint(column_flags fl) const
22{
23 if (app_name != image_name)
24 fl = column_flags(fl | cf_image_name);
25
26 // FIXME: see comment in symbol.h: why we don't use sample.vma + size ?
27 if (sample.vma & ~0xffffffffLLU)
28 fl = column_flags(fl | cf_64bit_vma);
29
30 return fl;
31}
32
33
34
35bool has_sample_counts(count_array_t const & counts, size_t lo, size_t hi)
36{
37 for (size_t i = lo; i <= hi; ++i)
38 if (counts[i] != 0)
39 return true;
40 return false;
41}
42
43
44string const & get_image_name(image_name_id id,
45 image_name_storage::image_name_type type,
46 extra_images const & extra)
47{
48 return image_names.get_name(id, type, extra);
49}