commit | 8eb3509491a294c917d10669ae183e5160d109a9 | [log] [tgz] |
---|---|---|
author | Yabin Cui <yabinc@google.com> | Fri Jan 13 11:09:35 2023 -0800 |
committer | Yabin Cui <yabinc@google.com> | Fri Jan 13 11:09:35 2023 -0800 |
tree | 5575e4023ed470a192e67ea61731e5a7c9e70b30 | |
parent | dfbfb9cccaf4d68d91d18dd645b0acb87c474e0c [diff] |
simpleperf: fix ReadAuxDataFromKernelBuffer. Record buffer is a circular buffer. AllocWriteSpace() allocates a continuous space from it. If alloc_size > record_buffer_critical_level, AllocWriteSpace(alloc_size) may fail even when free_size >= alloc_size + critical_level. So we need to handle that situation. Bug: none Test: run simpleperf_unit_test Change-Id: I3fc82162fb00bde644086b4e277e631434fad304