Re: [PATCH v4 06/21] perf arm-spe: Refactor printing string to buffer

2020-10-27 Thread Leo Yan
Hi Dave, On Tue, Oct 27, 2020 at 02:31:54PM +, Dave Martin wrote: > On Tue, Oct 27, 2020 at 03:09:02AM +, Leo Yan wrote: > > When outputs strings to the decoding buffer with function snprintf(), > > SPE decoder needs to detects if any error returns from snprintf() and if > > so needs to di

Re: [PATCH v4 06/21] perf arm-spe: Refactor printing string to buffer

2020-10-27 Thread Dave Martin
On Tue, Oct 27, 2020 at 03:09:02AM +, Leo Yan wrote: > When outputs strings to the decoding buffer with function snprintf(), > SPE decoder needs to detects if any error returns from snprintf() and if > so needs to directly bail out. If snprintf() returns success, it needs > to update buffer po

[PATCH v4 06/21] perf arm-spe: Refactor printing string to buffer

2020-10-26 Thread Leo Yan
When outputs strings to the decoding buffer with function snprintf(), SPE decoder needs to detects if any error returns from snprintf() and if so needs to directly bail out. If snprintf() returns success, it needs to update buffer pointer and reduce the buffer length so can continue to output the