Skip to content

Commit

Permalink
[profiler] In mprof-report fix handling of the time filter when start…
Browse files Browse the repository at this point in the history
…ing from 0 (xambug #11904).
  • Loading branch information
illupus committed May 13, 2014
1 parent d33d022 commit fa59a71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mono/profiler/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ static uint64_t find_size = 0;
static const char* find_name = NULL;
static uint64_t time_from = 0;
static uint64_t time_to = 0xffffffffffffffffULL;
static int use_time_filter = 0;
static uint64_t startup_time = 0;
static FILE* outfile = NULL;

Expand Down Expand Up @@ -1896,7 +1897,7 @@ decode_buffer (ProfContext *ctx)
return 0;
if (!startup_time) {
startup_time = time_base;
if (time_from) {
if (use_time_filter) {
time_from += startup_time;
time_to += startup_time;
}
Expand Down Expand Up @@ -3149,6 +3150,7 @@ main (int argc, char *argv[])
}
time_from = from_secs * 1000000000;
time_to = to_secs * 1000000000;
use_time_filter = 1;
} else if (strcmp ("--verbose", argv [i]) == 0) {
verbose++;
} else if (strcmp ("--traces", argv [i]) == 0) {
Expand Down

0 comments on commit fa59a71

Please sign in to comment.