Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1694459 > unrolled thread
| Started by | "Huang\, Ying" <ying.huang@intel.com> |
|---|---|
| First post | 2017-07-24 07:50 +0200 |
| Last post | 2017-07-25 02:40 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
Is it possible to use ftrace to measure secondary CPU bootup time "Huang\, Ying" <ying.huang@intel.com> - 2017-07-24 07:50 +0200
Re: Is it possible to use ftrace to measure secondary CPU bootup time Steven Rostedt <rostedt@goodmis.org> - 2017-07-24 11:20 +0200
RE: Is it possible to use ftrace to measure secondary CPU bootup time "Brandt, Todd E" <todd.e.brandt@intel.com> - 2017-07-24 23:50 +0200
Re: Is it possible to use ftrace to measure secondary CPU bootup time Steven Rostedt <rostedt@goodmis.org> - 2017-07-26 23:30 +0200
Re: Is it possible to use ftrace to measure secondary CPU bootup time "Huang\, Ying" <ying.huang@intel.com> - 2017-07-25 02:40 +0200
| From | "Huang\, Ying" <ying.huang@intel.com> |
|---|---|
| Date | 2017-07-24 07:50 +0200 |
| Subject | Is it possible to use ftrace to measure secondary CPU bootup time |
| Message-ID | <u6EpH-Fb-1@gated-at.bofh.it> |
Hi, Steven, We are working on parallelizing secondary CPU bootup. So we need to measure the bootup time of secondary CPU, that is, measure time spent in smp_init() and its callees. But we found that ftrace now doesn't support measure time spent in smp_init() because it is called too early (before core_initcall()?). So, do you think it is possible to use ftrace to measure secondary CPU bootup time? Thanks, Huang, Ying
[toc] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2017-07-24 11:20 +0200 |
| Subject | Re: Is it possible to use ftrace to measure secondary CPU bootup time |
| Message-ID | <u6HGX-2Pd-11@gated-at.bofh.it> |
| In reply to | #1694459 |
On Mon, 24 Jul 2017 13:46:07 +0800 "Huang\, Ying" <ying.huang@intel.com> wrote: > Hi, Steven, > > We are working on parallelizing secondary CPU bootup. So we need to > measure the bootup time of secondary CPU, that is, measure time spent in > smp_init() and its callees. But we found that ftrace now doesn't > support measure time spent in smp_init() because it is called too early > (before core_initcall()?). So, do you think it is possible to use > ftrace to measure secondary CPU bootup time? One could trace with function tracing that early, but that wont give you the timings you are looking for. The best it probably could do is to look at the function timestamps of what is called after smp_init. That is, trace smp_init() and sched_init_smp() and take the difference. Function graph tracing (which is what you are probably looking for) is much more heavy weight than function tracing. It requires some setup that isn't ready that early. Although, I'm sure I can work to get it there, but it's not trivial. -- Steve
[toc] | [prev] | [next] | [standalone]
| From | "Brandt, Todd E" <todd.e.brandt@intel.com> |
|---|---|
| Date | 2017-07-24 23:50 +0200 |
| Subject | RE: Is it possible to use ftrace to measure secondary CPU bootup time |
| Message-ID | <u6ToL-2fn-35@gated-at.bofh.it> |
| In reply to | #1694567 |
> > On Mon, 24 Jul 2017 13:46:07 +0800 > "Huang\, Ying" <ying.huang@intel.com> wrote: > > > Hi, Steven, > > > > We are working on parallelizing secondary CPU bootup. So we need to > > measure the bootup time of secondary CPU, that is, measure time spent in > > smp_init() and its callees. But we found that ftrace now doesn't > > support measure time spent in smp_init() because it is called too early > > (before core_initcall()?). So, do you think it is possible to use > > ftrace to measure secondary CPU bootup time? > > One could trace with function tracing that early, but that wont give > you the timings you are looking for. The best it probably could do is > to look at the function timestamps of what is called after smp_init. > That is, trace smp_init() and sched_init_smp() and take the difference. > > Function graph tracing (which is what you are probably looking for) is > much more heavy weight than function tracing. It requires some setup > that isn't ready that early. Although, I'm sure I can work to get it > there, but it's not trivial. Function graph tracing is indeed the target, as its the basis of the bootgraph tool. However, kprobes would work just as well. What's the difference in effort between enabling kprobes for early boot vs function graph trace? > > -- Steve
[toc] | [prev] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2017-07-26 23:30 +0200 |
| Subject | Re: Is it possible to use ftrace to measure secondary CPU bootup time |
| Message-ID | <u7C2u-5CF-15@gated-at.bofh.it> |
| In reply to | #1695145 |
On Mon, 24 Jul 2017 21:40:24 +0000 "Brandt, Todd E" <todd.e.brandt@intel.com> wrote: > Function graph tracing is indeed the target, as its the basis of the bootgraph > tool. However, kprobes would work just as well. What's the difference in effort > between enabling kprobes for early boot vs function graph trace? > Hmm, good question. But then again, if you are only worried about timings, tracing functions and looking at how long the next function happens after the one you are interested in, should give you a good idea of how long that function took. If there is more interest, I could spend some time seeing if I can get function graph tracing working early. -- Steve
[toc] | [prev] | [next] | [standalone]
| From | "Huang\, Ying" <ying.huang@intel.com> |
|---|---|
| Date | 2017-07-25 02:40 +0200 |
| Message-ID | <u6W3g-495-11@gated-at.bofh.it> |
| In reply to | #1694567 |
Steven Rostedt <rostedt@goodmis.org> writes: > On Mon, 24 Jul 2017 13:46:07 +0800 > "Huang\, Ying" <ying.huang@intel.com> wrote: > >> Hi, Steven, >> >> We are working on parallelizing secondary CPU bootup. So we need to >> measure the bootup time of secondary CPU, that is, measure time spent in >> smp_init() and its callees. But we found that ftrace now doesn't >> support measure time spent in smp_init() because it is called too early >> (before core_initcall()?). So, do you think it is possible to use >> ftrace to measure secondary CPU bootup time? > > One could trace with function tracing that early, but that wont give > you the timings you are looking for. The best it probably could do is > to look at the function timestamps of what is called after smp_init. > That is, trace smp_init() and sched_init_smp() and take the difference. > > Function graph tracing (which is what you are probably looking for) is > much more heavy weight than function tracing. It requires some setup > that isn't ready that early. Although, I'm sure I can work to get it > there, but it's not trivial. Got it! Thanks a lot! Best Regards, Huang, Ying > -- Steve
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web