Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 701716
Collapse All | Expand All

(-)a/third_party/grpc/src/core/lib/gpr/log_linux.cc (-2 / +2 lines)
Lines 40-46 Link Here
40
#include <time.h>
40
#include <time.h>
41
#include <unistd.h>
41
#include <unistd.h>
42
42
43
static long gettid(void) { return syscall(__NR_gettid); }
43
static long sys_gettid(void) { return syscall(__NR_gettid); }
44
44
45
void gpr_log(const char* file, int line, gpr_log_severity severity,
45
void gpr_log(const char* file, int line, gpr_log_severity severity,
46
             const char* format, ...) {
46
             const char* format, ...) {
Lines 70-76 void gpr_default_log(gpr_log_func_args* args) { Link Here
70
  gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
70
  gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
71
  struct tm tm;
71
  struct tm tm;
72
  static __thread long tid = 0;
72
  static __thread long tid = 0;
73
  if (tid == 0) tid = gettid();
73
  if (tid == 0) tid = sys_gettid();
74
74
75
  timer = static_cast<time_t>(now.tv_sec);
75
  timer = static_cast<time_t>(now.tv_sec);
76
  final_slash = strrchr(args->file, '/');
76
  final_slash = strrchr(args->file, '/');
(-)a/third_party/grpc/src/core/lib/gpr/log_posix.cc (-2 / +2 lines)
Lines 31-37 Link Here
31
#include <string.h>
31
#include <string.h>
32
#include <time.h>
32
#include <time.h>
33
33
34
static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
34
static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
35
35
36
void gpr_log(const char* file, int line, gpr_log_severity severity,
36
void gpr_log(const char* file, int line, gpr_log_severity severity,
37
             const char* format, ...) {
37
             const char* format, ...) {
Lines 86-92 void gpr_default_log(gpr_log_func_args* args) { Link Here
86
  char* prefix;
86
  char* prefix;
87
  gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]",
87
  gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]",
88
               gpr_log_severity_string(args->severity), time_buffer,
88
               gpr_log_severity_string(args->severity), time_buffer,
89
               (int)(now.tv_nsec), gettid(), display_file, args->line);
89
               (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
90
90
91
  fprintf(stderr, "%-70s %s\n", prefix, args->message);
91
  fprintf(stderr, "%-70s %s\n", prefix, args->message);
92
  gpr_free(prefix);
92
  gpr_free(prefix);
(-)a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc (-2 / +2 lines)
Lines 1102-1108 static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, Link Here
1102
}
1102
}
1103
1103
1104
#ifndef NDEBUG
1104
#ifndef NDEBUG
1105
static long gettid(void) { return syscall(__NR_gettid); }
1105
static long sys_gettid(void) { return syscall(__NR_gettid); }
1106
#endif
1106
#endif
1107
1107
1108
/* pollset->mu lock must be held by the caller before calling this.
1108
/* pollset->mu lock must be held by the caller before calling this.
Lines 1122-1128 static grpc_error* pollset_work(grpc_pollset* pollset, Link Here
1122
#define WORKER_PTR (&worker)
1122
#define WORKER_PTR (&worker)
1123
#endif
1123
#endif
1124
#ifndef NDEBUG
1124
#ifndef NDEBUG
1125
  WORKER_PTR->originator = gettid();
1125
  WORKER_PTR->originator = sys_gettid();
1126
#endif
1126
#endif
1127
  if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
1127
  if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
1128
    gpr_log(GPR_INFO,
1128
    gpr_log(GPR_INFO,

Return to bug 701716