forked from krakjoe/stat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzend_stat_sampler.h
49 lines (44 loc) · 1.98 KB
/
zend_stat_sampler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
+----------------------------------------------------------------------+
| stat |
+----------------------------------------------------------------------+
| Copyright (c) Joe Watkins 2019 |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: krakjoe |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_STAT_SAMPLER_H
# define ZEND_STAT_SAMPLER_H
#include "zend_stat_sample.h"
typedef struct _zend_heap_header_t zend_heap_header_t;
typedef struct _zend_stat_sampler_t {
pid_t pid;
struct zend_stat_sampler_timer_t {
pthread_mutex_t mutex;
pthread_cond_t cond;
zend_bool closed;
zend_bool active;
pthread_t thread;
} timer;
struct {
HashTable strings;
#ifdef ZEND_ACC_IMMUTABLE
HashTable symbols;
#endif
} cache;
zend_bool arginfo;
zend_stat_buffer_t *buffer;
zend_heap_header_t *heap;
zend_execute_data *fp;
} zend_stat_sampler_t;
void zend_stat_sampler_activate(zend_stat_sampler_t *sampler, pid_t pid, zend_stat_buffer_t *buffer);
void zend_stat_sampler_deactivate(zend_stat_sampler_t *sampler);
#endif /* ZEND_STAT_SAMPLER_H */