-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uftrace replay set time range fail #1593
Comments
|
The message |
|
Oh, I see. In record mode, I use "-t 1us" to filter some very short time functions or system events. |
|
Oh, right. I forgot the commit f699ea4 ("uftrace: Store time-filter info to uftrace.data/default.opts") could create the default options for the time filter under the table. The following change should fix the issue. diff --git a/uftrace.c b/uftrace.c
index 668e9e303d..2b88e49913 100644
--- a/uftrace.c
+++ b/uftrace.c
@@ -616,9 +616,11 @@ static int parse_option(struct opts *opts, int key, char *arg)
break;
case 't':
- /* do not override time-filter if it's already set */
- if (parsing_default_opts && opts->threshold)
- break;
+ /* do not override time-filter or time-range if it's already set */
+ if (parsing_default_opts) {
+ if (opts->threshold || opts->range.start || opts->range.stop)
+ break;
+ }
/* add time-filter to uftrace.data/default.opts */
strv_append(&default_opts, "-t"); |
|
Thanks!It's ok right now. And, use command: Then, the filter result as follows: if the extra information can be filtered, the meaning of '-r' parameter will be better. |
|
Thanks for the test. I'll take a look. |
|
Sorry for the delay. I think we should add this. diff --git a/utils/perf.c b/utils/perf.c
index 8912e39499..b1a0197fcd 100644
--- a/utils/perf.c
+++ b/utils/perf.c
@@ -413,6 +413,9 @@ static int read_perf_event(struct uftrace_data *handle, struct uftrace_perf_read
if (unlikely(task == NULL || task->fp == NULL))
goto again;
+ if (!check_time_range(&handle->time_range, perf->time))
+ goto again;
+
perf->type = h.type;
perf->valid = true;
return 0; |
|
Please check out review/time-range branch. |
It's ok right now, thank you! |
I want to use parameter "-r" or "--time-range" to get some information in specify range time. But the result still show all the record information.
For example, there are the following trace reslut:
Then, use '-r' to specify a time range, but the result as same as filter before.
I think the parameter '-r' did not work.
test version:
The text was updated successfully, but these errors were encountered: