Skip to content
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

schedule event doesn't work with time-filter #658

Closed
honggyukim opened this issue Jan 21, 2019 · 5 comments · Fixed by #788
Closed

schedule event doesn't work with time-filter #658

honggyukim opened this issue Jan 21, 2019 · 5 comments · Fixed by #788
Labels

Comments

@honggyukim
Copy link
Collaborator

Please see below. The time-filter is set to 10ms, but there are events which are under the time threshold.

$ uftrace record -t 10ms ./clang hello.c

$ uftrace replay
# DURATION     TID     FUNCTION
            [178116] | _GLOBAL__sub_I_ARMFrameLowering.cpp() {
   5.945 ms [178116] |   /* linux:schedule */
            [178116] |   llvm::cl::Option::addArgument() {
 271.693 us [178116] |     /* linux:schedule */
            [178116] |     llvm::ManagedStaticBase::RegisterManagedStatic() {
   1.760 ms [178116] |       /* linux:schedule */
   9.018 ms [178116] |       /* linux:schedule */
 197.215 us [178116] |       /* linux:schedule */
  11.100 ms [178116] |     } /* llvm::ManagedStaticBase::RegisterManagedStatic */
 191.312 us [178116] |     /* linux:schedule */
  11.631 ms [178116] |   } /* llvm::cl::Option::addArgument */
  17.620 ms [178116] | } /* _GLOBAL__sub_I_ARMFrameLowering.cpp */
            [178116] | _GLOBAL__sub_I_ARMAsmParser.cpp() {
            [178116] |   __static_initialization_and_destruction_0() {
  19.550 ms [178116] |     /* linux:schedule */
   2.124 ms [178116] |     /* linux:schedule */
  21.767 ms [178116] |   } /* __static_initialization_and_destruction_0 */
  21.768 ms [178116] | } /* _GLOBAL__sub_I_ARMAsmParser.cpp */
            [178116] | _GLOBAL__sub_I_MachineScheduler.cpp() {
            [178116] |   __static_initialization_and_destruction_0() {
   2.450 ms [178116] |     /* linux:schedule */
   7.352 ms [178116] |     /* linux:schedule */
 344.297 us [178116] |     /* linux:schedule */
  10.342 ms [178116] |   } /* __static_initialization_and_destruction_0 */
  10.343 ms [178116] | } /* _GLOBAL__sub_I_MachineScheduler.cpp */
            [178116] | _GLOBAL__sub_I_DwarfDebug.cpp() {
            [178116] |   __static_initialization_and_destruction_0() {
  19.927 ms [178116] |     /* linux:schedule */
  20.027 ms [178116] |   } /* __static_initialization_and_destruction_0 */
  20.027 ms [178116] | } /* _GLOBAL__sub_I_DwarfDebug.cpp */
            [178116] | _GLOBAL__sub_I_ModuleSummaryIndex.cpp() {
  15.123 ms [178116] |   /* linux:schedule */
  15.185 ms [178116] | } /* _GLOBAL__sub_I_ModuleSummaryIndex.cpp */
            [178116] | main() {
   8.016 ms [178116] |   /* linux:schedule */
   5.461 ms [178116] |   /* linux:schedule */
   8.761 ms [178116] |   /* linux:schedule */
            [178116] |   LLVMInitializeARMTarget() {
   9.735 ms [178116] |     /* linux:schedule */
 170.202 us [178116] |     /* linux:schedule */
 339.266 us [178116] |     /* linux:schedule */
 338.426 us [178116] |     /* linux:schedule */
 314.810 us [178116] |     /* linux:schedule */
  11.775 ms [178116] |   } /* LLVMInitializeARMTarget */
 220.885 us [178116] |   /* linux:schedule */
            [178116] |   LLVMInitializeX86Target() {
        ...
@namhyung
Copy link
Owner

The scheduling and task events are recorded asynchronously using perf event and it doesn't aware of the time filter setting. You need to set it for replay again.. sorry.

@honggyukim
Copy link
Collaborator Author

We may force behind to use time-filter setting of recorded data for replay and other analysis commands.

@namhyung
Copy link
Owner

That'd be a possible way..

@honggyukim
Copy link
Collaborator Author

Should we add one more special info bit to uftrace.data/info for time-filter setting?

@honggyukim
Copy link
Collaborator Author

As mentioned in #699 (comment), this problem makes the replay and other outputs kind of ugly in some cases. So I always have to say the users to use time-filter for all the other analysis commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants