Re: [PATCH v9 01/16] perf arm-spe: Refactor printing string to buffer

2020-11-26 Thread Leo Yan
On Thu, Nov 26, 2020 at 09:11:58AM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Nov 19, 2020 at 11:24:26PM +0800, Leo Yan escreveu: > > When outputs strings to the decoding buffer with function snprintf(), > > SPE decoder needs to detects if any error returns from snprintf() and if > > so

Re: [PATCH v9 01/16] perf arm-spe: Refactor printing string to buffer

2020-11-26 Thread Arnaldo Carvalho de Melo
Em Thu, Nov 19, 2020 at 11:24:26PM +0800, Leo Yan escreveu: > 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

[PATCH v9 01/16] perf arm-spe: Refactor printing string to buffer

2020-11-19 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