mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 16:43:33 +03:00
Consistently use debug lib(s) if present
Fixes a situation where nm uses the debug lib but addr2line does not, which completely messes up the symbol lookup.
This commit is contained in:
parent
4bbf8181f3
commit
c2da2591be
1 changed files with 5 additions and 8 deletions
13
src/prof.c
13
src/prof.c
|
|
@ -11,12 +11,6 @@
|
||||||
#include <unwind.h>
|
#include <unwind.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
#define PROCESS_VMEM_MAP "/proc/curproc/map"
|
|
||||||
#else
|
|
||||||
#define PROCESS_VMEM_MAP "/proc/%d/maps"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Data. */
|
/* Data. */
|
||||||
|
|
||||||
|
|
@ -941,9 +935,12 @@ prof_dump_maps(bool propagate_err)
|
||||||
char filename[PATH_MAX + 1];
|
char filename[PATH_MAX + 1];
|
||||||
|
|
||||||
cassert(config_prof);
|
cassert(config_prof);
|
||||||
|
#ifdef __FreeBSD__
|
||||||
malloc_snprintf(filename, sizeof(filename), PROCESS_VMEM_MAP,
|
malloc_snprintf(filename, sizeof(filename), "/proc/curproc/map");
|
||||||
|
#else
|
||||||
|
malloc_snprintf(filename, sizeof(filename), "/proc/%d/maps",
|
||||||
(int)getpid());
|
(int)getpid());
|
||||||
|
#endif
|
||||||
mfd = open(filename, O_RDONLY);
|
mfd = open(filename, O_RDONLY);
|
||||||
if (mfd != -1) {
|
if (mfd != -1) {
|
||||||
ssize_t nread;
|
ssize_t nread;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue