[PATCH] D151025: [llvm-exegesis] Add support for using memory annotations

Aiden Grossman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 10:09:25 PDT 2023


aidengrossman added a comment.

I'm not sure what could be going wrong. I saw segmentation fault failures on one of the builders but after I added a check to the lit config to ensure that the subprocess mode was actually supported it went away. It might have something to do with security policies since this patch does some things that probably seem quite abnormal in regards to the process memory, but I might be completely wrong there with that assumption.

To debug you need to modify the code slightly as this patch uses `ptrace`, so `lldb` isn't able to grab the child process because there's already another process tracing it. You'll need to comment out the `ptrace` calls and then you should be able to get into the child process. I had a flag to do that on one of my development branches that maybe I should upstream at some point.

Once you have that setup, I've found it easiest to debug by breaking on a line right before the function call into the MCJITed test/test harness. Then I would single step through the assembly to see what was happening.

However, I understand this might be a pain to debug, so if you want me to disable the tests or add something to the lit config to ensure that these tests only run if memory annotations don't cause seg-faults while we can work on reproducing it without being too interruptive, I'm fine with doing that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151025



More information about the llvm-commits mailing list