[Lldb-commits] [PATCH] D123984: [trace][intel pt] Add a memory usage test

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 19 08:05:32 PDT 2022


wallace added a comment.

> To catch changes that may increase the memory by a lot?

exactly. We might introduce changes in the decoder that might produce erroneous data and increase the memory usage or number of instructions by too much. For example, all our current tests work with small number of instructions, so they are easy to assert. But when dealing with milllions of instructions, it's hard to assert what will happen unless we look for statistics. In this specific case, because we only care about x86, the number of instructions shouldn't change because we compile without optimizations, so I doubt it'll be flaky. In terms of context switches, each context switch only adds a minimal amount of bytes. In fact, each context switch only contributes one entry in the events map.

But besides all that, which doesn't sound very convincing, what I want to start having is tests with binaries that are compiled at the moment without the need of prebuilt binaries. People complain too much every time someone tries to commit a prebuilt binary because of two reasons: it's very heavy for the source control system, and it might fail on some machines with a different setup for some system libraries. When the test binary is compiled at the moment, then the compiler will ensure that it can run on the current machine.

So this is more like a learning step for me while being useful to test some other things.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123984/new/

https://reviews.llvm.org/D123984



More information about the lldb-commits mailing list