Re: [RFC PATCH] perf/core: exposing type of context-switch-out event
On Donnerstag, 1. März 2018 20:36:59 CET Andi Kleen wrote: > > Please also add documentation Documentation/perf.data-file-format.txt, but > > I just noticed that not even PERF_RECORD_SWITCH is documented there... > > That file only covers fields not generated by the kernel, but this > is coming from the kernel. > > Kernel records are documented in the manpage, but Vince usually updates > that on his own. Ah, TIL - thanks for that tip! But I still think it would be good to have a complete documentation of the perf.data file format in one place. I guess patches would be welcome to add more aspects of the file format there, even if it's generated by the kernel? That helps for thirdparty tools that parse the perf.data files (like perfparser used by QtCreator and hotspot). Cheers -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: S/MIME cryptographic signature
Re: [RFC PATCH] perf/core: exposing type of context-switch-out event
On Donnerstag, 1. März 2018 20:36:59 CET Andi Kleen wrote: > > Please also add documentation Documentation/perf.data-file-format.txt, but > > I just noticed that not even PERF_RECORD_SWITCH is documented there... > > That file only covers fields not generated by the kernel, but this > is coming from the kernel. > > Kernel records are documented in the manpage, but Vince usually updates > that on his own. Ah, TIL - thanks for that tip! But I still think it would be good to have a complete documentation of the perf.data file format in one place. I guess patches would be welcome to add more aspects of the file format there, even if it's generated by the kernel? That helps for thirdparty tools that parse the perf.data files (like perfparser used by QtCreator and hotspot). Cheers -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: S/MIME cryptographic signature
Re: [RFC PATCH] perf/core: exposing type of context-switch-out event
> Please also add documentation Documentation/perf.data-file-format.txt, but I > just noticed that not even PERF_RECORD_SWITCH is documented there... That file only covers fields not generated by the kernel, but this is coming from the kernel. Kernel records are documented in the manpage, but Vince usually updates that on his own. -Andi
Re: [RFC PATCH] perf/core: exposing type of context-switch-out event
> Please also add documentation Documentation/perf.data-file-format.txt, but I > just noticed that not even PERF_RECORD_SWITCH is documented there... That file only covers fields not generated by the kernel, but this is coming from the kernel. Kernel records are documented in the manpage, but Vince usually updates that on his own. -Andi
Re: [RFC PATCH] perf/core: exposing type of context-switch-out event
On Donnerstag, 1. März 2018 19:08:05 CET Andi Kleen wrote: > On Thu, Mar 01, 2018 at 06:40:04PM +0300, Alexey Budankov wrote: > > Hi, > > > > This patch prototypes exposing the type of context-switch-out event using > > PERF_RECORD_MISC_EXT_RESERVED bit for PERF_RECORD_SWITCH[_CPU_WIDE] > > records. > It would be better to define an actually named bit in perf_event.h. > It can be the same value. > > Also we would need a patch for perf script / perf report -D to print this > information. > > The rest looks good to me. Please also add documentation Documentation/perf.data-file-format.txt, but I just noticed that not even PERF_RECORD_SWITCH is documented there... Otherwise I also think that this would be a very nice feature addition! -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: S/MIME cryptographic signature
Re: [RFC PATCH] perf/core: exposing type of context-switch-out event
On Donnerstag, 1. März 2018 19:08:05 CET Andi Kleen wrote: > On Thu, Mar 01, 2018 at 06:40:04PM +0300, Alexey Budankov wrote: > > Hi, > > > > This patch prototypes exposing the type of context-switch-out event using > > PERF_RECORD_MISC_EXT_RESERVED bit for PERF_RECORD_SWITCH[_CPU_WIDE] > > records. > It would be better to define an actually named bit in perf_event.h. > It can be the same value. > > Also we would need a patch for perf script / perf report -D to print this > information. > > The rest looks good to me. Please also add documentation Documentation/perf.data-file-format.txt, but I just noticed that not even PERF_RECORD_SWITCH is documented there... Otherwise I also think that this would be a very nice feature addition! -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: S/MIME cryptographic signature
Re: [RFC PATCH] perf/core: exposing type of context-switch-out event
On Thu, Mar 01, 2018 at 06:40:04PM +0300, Alexey Budankov wrote: > Hi, > > This patch prototypes exposing the type of context-switch-out event using > PERF_RECORD_MISC_EXT_RESERVED bit for PERF_RECORD_SWITCH[_CPU_WIDE] records. It would be better to define an actually named bit in perf_event.h. It can be the same value. Also we would need a patch for perf script / perf report -D to print this information. The rest looks good to me. -Andi
Re: [RFC PATCH] perf/core: exposing type of context-switch-out event
On Thu, Mar 01, 2018 at 06:40:04PM +0300, Alexey Budankov wrote: > Hi, > > This patch prototypes exposing the type of context-switch-out event using > PERF_RECORD_MISC_EXT_RESERVED bit for PERF_RECORD_SWITCH[_CPU_WIDE] records. It would be better to define an actually named bit in perf_event.h. It can be the same value. Also we would need a patch for perf script / perf report -D to print this information. The rest looks good to me. -Andi