mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Process name retrieval on apple.
This commit is contained in:
parent
8f75839d66
commit
9c966b6224
@ -27,6 +27,11 @@
|
||||
# include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include <unistd.h>
|
||||
# include <libproc.h>
|
||||
#endif
|
||||
|
||||
#include <atomic>
|
||||
#include <assert.h>
|
||||
#include <chrono>
|
||||
@ -219,6 +224,10 @@ static const char* GetProcessName()
|
||||
# endif
|
||||
#elif defined _GNU_SOURCE || defined __CYGWIN__
|
||||
processName = program_invocation_short_name;
|
||||
#elif defined __APPLE__
|
||||
static char buf[1024];
|
||||
proc_name( getpid(), buf, 1024 );
|
||||
processName = buf;
|
||||
#endif
|
||||
return processName;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user