[Openmp-commits] [PATCH] D128466: [OpenMP] Use /proc/self instead of /proc/<getpid()> to get mapped addresses
Lucian Adrian Grijincu via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jun 23 14:51:55 PDT 2022
luciang added inline comments.
================
Comment at: openmp/runtime/src/z_Linux_util.cpp:2019
#if KMP_OS_LINUX || KMP_OS_HURD
- /* On GNUish OSes, read the /proc/<pid>/maps pseudo-file to get all the
+ /* On GNUish OSes, read the /proc/self/maps pseudo-file to get all the
address ranges mapped into the address space. */
----------------
You might want to keep the existing `getpid()`-based version on HURD.
I'm not familiar enough with HURD, but based on the commit that added /proc/self - it seems to be an optional compat option and might not always be configured:
https://git.savannah.gnu.org/cgit/hurd/procfs.git/commit/?id=4665f087fde174a9de3e1c3f3de090dd4bfa85e0
```
+ { "fake-self", 'S', "PID", OPTION_ARG_OPTIONAL,
+ "Provide a fake \"self\" symlink to the given PID, for compatibility "
+ "purposes. If PID is omitted, \"self\" will point to init. "
+ "(default: no self link)" },
```
https://www.gnu.org/software/hurd/hurd/translator/procfs/jkoenig/discussion.html
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128466/new/
https://reviews.llvm.org/D128466
More information about the Openmp-commits
mailing list