comparison src/misc/ngx_google_perftools_module.c @ 566:be4f34123024 NGINX_0_8_35

nginx 0.8.35 *) Change: now the charset filter runs before the SSI filter. *) Feature: the "chunked_transfer_encoding" directive. *) Bugfix: an "&" character was not escaped when it was copied in arguments part in a rewrite rule. *) Bugfix: nginx might be terminated abnormally while a signal processing or if the directive "timer_resolution" was used on platforms which do not support kqueue or eventport notification methods. Thanks to George Xie and Maxim Dounin. *) Bugfix: if temporary files and permanent storage area resided at different file systems, then permanent file modification times were incorrect. Thanks to Maxim Dounin. *) Bugfix: ngx_http_memcached_module might issue the error message "memcached sent invalid trailer". Thanks to Maxim Dounin. *) Bugfix: nginx could not built zlib-1.2.4 library using the library sources. Thanks to Maxim Dounin. *) Bugfix: a segmentation fault occurred in a worker process, if there was large stderr output before FastCGI response; the bug had appeared in 0.8.34. Thanks to Maxim Dounin.
author Igor Sysoev <http://sysoev.ru>
date Mon, 29 Mar 2010 00:00:00 +0400
parents 9a242235a80a
children d0f7a625f27c
comparison
equal deleted inserted replaced
565:dd7104f21940 566:be4f34123024
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);
71 if (gptcf == NULL) { 71 if (gptcf == NULL) {
72 return NULL; 72 return NULL;
73 } 73 }
74 74
75 /* 75 /*
76 * set by pcalloc() 76 * set by ngx_pcalloc()
77 * 77 *
78 * gptcf->profiles = { 0, NULL }; 78 * gptcf->profiles = { 0, NULL };
79 */ 79 */
80 80
81 return gptcf; 81 return gptcf;
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,