Mercurial > hg > nginx
comparison src/misc/ngx_google_perftools_module.c @ 3478:eb8660fecc12
fix a comment and a style fix
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 26 Mar 2010 11:27:32 +0000 |
parents | e5ce4e2de846 |
children | f4957081d935 |
comparison
equal
deleted
inserted
replaced
3477:fb0b7450c2e8 | 3478:eb8660fecc12 |
---|---|
6 | 6 |
7 #include <ngx_config.h> | 7 #include <ngx_config.h> |
8 #include <ngx_core.h> | 8 #include <ngx_core.h> |
9 | 9 |
10 /* | 10 /* |
11 * declare Profiler here interface because | 11 * declare Profiler interface here because |
12 * <google/profiler.h> is C++ header file | 12 * <google/profiler.h> is C++ header file |
13 */ | 13 */ |
14 | 14 |
15 int ProfilerStart(u_char* fname); | 15 int ProfilerStart(u_char* fname); |
16 void ProfilerStop(void); | 16 void ProfilerStop(void); |
99 if (profile == NULL) { | 99 if (profile == NULL) { |
100 return NGX_OK; | 100 return NGX_OK; |
101 } | 101 } |
102 | 102 |
103 if (getenv("CPUPROFILE")) { | 103 if (getenv("CPUPROFILE")) { |
104 | |
105 /* disable inherited Profiler enabled in master process */ | 104 /* disable inherited Profiler enabled in master process */ |
106 ProfilerStop(); | 105 ProfilerStop(); |
107 } | 106 } |
108 | 107 |
109 ngx_sprintf(profile, "%V.%d%Z", &gptcf->profiles, ngx_pid); | 108 ngx_sprintf(profile, "%V.%d%Z", &gptcf->profiles, ngx_pid); |
110 | 109 |
111 if (ProfilerStart(profile)) { | 110 if (ProfilerStart(profile)) { |
112 | |
113 /* start ITIMER_PROF timer */ | 111 /* start ITIMER_PROF timer */ |
114 ProfilerRegisterThread(); | 112 ProfilerRegisterThread(); |
115 | 113 |
116 } else { | 114 } else { |
117 ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_errno, | 115 ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_errno, |