Chromium Code Reviews| Index: tools/android/memtrack_helper/memtrack_helper.h |
| diff --git a/tools/android/memtrack_helper/memtrack_helper.h b/tools/android/memtrack_helper/memtrack_helper.h |
| index df349c3c3ed6e9e05a5ee6d6c66d3d2f24480502..3334a25dd515ea5c2600ce69fafb86c260b3f45a 100644 |
| --- a/tools/android/memtrack_helper/memtrack_helper.h |
| +++ b/tools/android/memtrack_helper/memtrack_helper.h |
| @@ -14,6 +14,7 @@ |
| #include <string.h> |
| #include <sys/socket.h> |
| #include <sys/un.h> |
| +#include <unistd.h> |
| static inline void exit_with_failure(const char* reason) { |
| perror(reason); |
| @@ -28,4 +29,10 @@ static inline void init_memtrack_server_addr(struct sockaddr_un* addr) { |
| strncpy(&addr->sun_path[1], kAbstractSocketName, sizeof(addr->sun_path) - 2); |
| } |
| +static inline void log_pid() { |
|
Primiano Tucci (use gerrit)
2016/12/14 15:51:16
This is used only in one place, only in the .cc fi
kraynov
2016/12/15 15:43:48
Done.
|
| + long pid = getpid(); |
| + fprintf(stderr, "pid=%ld\n", pid); |
| + __android_log_print(ANDROID_LOG_INFO, "memtrack_helper", "pid=%ld\n", pid); |
| +} |
| + |
| #endif // TOOLS_ANDROID_MEMTRACK_HELPER_H_ |