Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147411
b: refs/heads/master
c: bad7600
h: refs/heads/master
i:
  147409: 0e6c70e
  147407: abbbec7
v: v3
  • Loading branch information
Ingo Molnar committed Apr 30, 2009
1 parent 10562be commit e9de8a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66cf782996f3d57d3cc199f0a2d47a54e2aa5991
refs/heads/master: bad760089c1ef7fe525c0f268a4078b9cb483903
18 changes: 16 additions & 2 deletions trunk/Documentation/perf_counter/perf-report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <ctype.h>
#include <time.h>
#include <getopt.h>
#include <assert.h>

#include <sys/ioctl.h>
#include <sys/poll.h>
Expand Down Expand Up @@ -226,7 +227,7 @@ void load_kallsyms(void)
while (!feof(file)) {
uint64_t start;
char c;
char sym[1024];
char sym[1024000];

if (getline(&line, &n, file) < 0)
break;
Expand Down Expand Up @@ -416,12 +417,23 @@ int main(int argc, char *argv[])

if (head + event->header.size >= page_size * mmap_window) {
unsigned long shift = page_size * (head / page_size);
int ret;

ret = munmap(buf, page_size * mmap_window);
assert(ret == 0);

munmap(buf, page_size * mmap_window);
offset += shift;
head -= shift;
goto remap;
}


if (!event->header.size) {
fprintf(stderr, "zero-sized event at file offset %ld\n", offset + head);
fprintf(stderr, "skipping %ld bytes of events.\n", stat.st_size - offset - head);
goto done;
}

head += event->header.size;

if (event->header.misc & PERF_EVENT_MISC_OVERFLOW) {
Expand Down Expand Up @@ -458,6 +470,8 @@ int main(int argc, char *argv[])
if (offset + head < stat.st_size)
goto more;

done:

close(input);

std::map<std::string, int>::iterator hi = hist.begin();
Expand Down

0 comments on commit e9de8a2

Please sign in to comment.