1 Index: oprofile/libpp/profile.cpp
2 ===================================================================
3 --- oprofile.orig/libpp/profile.cpp 2005-05-02 16:07:03.000000000 +0100
4 +++ oprofile/libpp/profile.cpp 2005-06-13 14:28:22.000000000 +0100
6 // if the image contains no symbol the vma range is [0 - filesize]
7 // in this case we can't substract start_offset else we will underflow
8 // and the iterator range will be empty.
10 + if (start < start_offset)
11 + return make_pair(const_iterator(ordered_samples.end(), 0),
12 + const_iterator(ordered_samples.end(), 0));
15 start -= start_offset;
17 Index: oprofile/libpp/callgraph_container.cpp
18 ===================================================================
19 --- oprofile.orig/libpp/callgraph_container.cpp 2005-05-02 16:07:02.000000000 +0100
20 +++ oprofile/libpp/callgraph_container.cpp 2005-06-13 14:27:57.000000000 +0100
23 b.get_symbol_range(i, start, end);
25 - profile_t::iterator_pair p_it = profile.samples_range(
26 - caller_to_key(start - boffset),
27 - caller_to_key(end - boffset));
29 - // Our odb_key_t contain (from_eip << 32 | to_eip), the range
30 - // of key we selected above contain one caller but different
31 - // callee and due to the ordering callee offsets are not
32 - // consecutive so we must sort them first.
36 - for (; p_it.first != p_it.second; ++p_it.first) {
37 - samples.push_back(make_pair(p_it.first.vma(),
38 - p_it.first.count()));
40 + if (start > boffset) {
41 + profile_t::iterator_pair p_it = profile.samples_range(
42 + caller_to_key(start - boffset),
43 + caller_to_key(end - boffset));
45 + // Our odb_key_t contain (from_eip << 32 | to_eip), the range
46 + // of key we selected above contain one caller but different
47 + // callee and due to the ordering callee offsets are not
48 + // consecutive so we must sort them first.
52 + for (; p_it.first != p_it.second; ++p_it.first) {
53 + samples.push_back(make_pair(p_it.first.vma(),
54 + p_it.first.count()));
59 sort(samples.begin(), samples.end(), compare_by_callee_vma);