| 447 | #endif |
| 448 | |
| 449 | static int |
| 450 | prof_dump_open_maps_impl() { |
| 451 | int mfd; |
| 452 | |
| 453 | cassert(config_prof); |
| 454 | #if defined(__FreeBSD__) || defined(__DragonFly__) |
| 455 | mfd = prof_open_maps_internal("/proc/curproc/map"); |
| 456 | #elif defined(_WIN32) |
| 457 | mfd = -1; // Not implemented |
| 458 | #else |
| 459 | int pid = prof_getpid(); |
| 460 | |
| 461 | mfd = prof_open_maps_internal("/proc/%d/task/%d/maps", pid, pid); |
| 462 | if (mfd == -1) { |
| 463 | mfd = prof_open_maps_internal("/proc/%d/maps", pid); |
| 464 | } |
| 465 | #endif |
| 466 | return mfd; |
| 467 | } |
| 468 | prof_dump_open_maps_t *JET_MUTABLE prof_dump_open_maps = |
| 469 | prof_dump_open_maps_impl; |
| 470 |
nothing calls this directly
no test coverage detected