tobert / pcstat

Page Cache stat: get page cache stats for files on Linux
Apache License 2.0
1.23k stars 153 forks source link

Use syscall numbers from x/sys/unix #26

Closed kokes closed 3 years ago

kokes commented 3 years ago

As noted in #25, pcstat does not build for linux/arm64 and it's due to SYS_SETNS being hardcoded for linux/{amd64,386} and nothing else. I looked around and saw SYS_SETNS being specified in x/sys/unix, it was added a few months after you started this project (and later added for arm64 as well).

If I understand it correctly, we can safely remove the two files specifying SYS_SETNS and use unix.SYS_SETNS? I'm not super fluent in this area, so let me know if I'm totally off here.

In any case, I've commited the (trivial) change here, let me know if you want me to open a PR. https://github.com/kokes/pcstat/commit/da613da65c02387f4dac39c4ea8885daf0a9266f

tobert commented 3 years ago

Hey sorry I took so long on this. It's merged now and I'm going to release some binaries too, including ARM.