Closed grahamwoodward closed 2 months ago
Of course it's something I'd accept, y'know, assuming it's nothing too crazy. I'm assuming it's just an extra condition checking the value of pmu_name
, and some extra logic choosing a perf
event to use, right?
Edit: Forgot about disassembly. Is there some disassembler that can handle both x86 and ARM?
Of course it's something I'd accept, y'know, assuming it's nothing too crazy. I'm assuming it's just an extra condition checking the value of
pmu_name
, and some extra logic choosing aperf
event to use, right?Edit: Forgot about disassembly. Is there some disassembler that can handle both x86 and ARM?
So to answer the second question, I've added a dependency on Capstone, it actually supports x86...however I didn't really want to be on the hook for regression testing x86 if we switched to Capstone, although it'd make my patch a bit neater as I could remove some #ifdefs that I've got depending on whether it's compiling for x86 or Arm.
And yeah for the first question, I'm not checking for the pmu_name and using a slightly different event id. Also needed to change the default "categories"
How about I raise a PR and you can see. I'm happy to look at swapping Zydis for Capstone as well, do you have any regression tests internally that do any checking that certain x86 instructions have been correctly decoded that we could use to confirm all is good with Capstone?
Sure thing, submit the PR. Capstone could be a good idea; I'll give it a spin.
@matthew-olson-intel I've opened a PR with the patch...admittedly the code is a littered with #ifdef's, which isn't the best...we could either
Replace Zydis with Capstone
Add another layer of abstraction and some APIs to get the mnemonics/categories and have those APIs call the right disassembler
would remove some of the #ifdefs but 1. is probably best and would allow PW to support other architectures
Aight, this is in progress in #17.
Fixed by #17!
Hi I was wondering whether you'd accept a patch that gets Process Watch working on Arm, specifically targeting aarch64?
I have a patch ready to go but wanted to first check whether it's something you'd be willing to accept, or if you prefer I forked the repo ?
Thanks