This repository was archived by the owner on Jan 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathphp_stackdriver_debugger.h
84 lines (65 loc) · 2.8 KB
/
php_stackdriver_debugger.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef PHP_STACKDRIVER_H
#define PHP_STACKDRIVER_H 1
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "stackdriver_debugger.h"
#define PHP_STACKDRIVER_DEBUGGER_VERSION "0.3.0"
#define PHP_STACKDRIVER_DEBUGGER_EXTNAME "stackdriver_debugger"
#define PHP_STACKDRIVER_DEBUGGER_INI_ALLOWED_FUNCTIONS "stackdriver_debugger.functions_allowed"
#define PHP_STACKDRIVER_DEBUGGER_INI_MAX_TIME "stackdriver_debugger.max_time"
#define PHP_STACKDRIVER_DEBUGGER_INI_MAX_TIME_PERCENTAGE "stackdriver_debugger.max_time_percentage"
#define PHP_STACKDRIVER_DEBUGGER_INI_MAX_MEMORY "stackdriver_debugger.max_memory"
PHP_FUNCTION(stackdriver_debugger_version);
extern zend_module_entry stackdriver_debugger_module_entry;
#define phpext_stackdriver_debugger_ptr &stackdriver_debugger_module_entry
PHP_MINIT_FUNCTION(stackdriver_debugger);
PHP_MSHUTDOWN_FUNCTION(stackdriver_debugger);
PHP_RINIT_FUNCTION(stackdriver_debugger);
PHP_RSHUTDOWN_FUNCTION(stackdriver_debugger);
ZEND_BEGIN_MODULE_GLOBALS(stackdriver_debugger)
/* map of function name -> empty null zval */
HashTable *user_allowed_functions;
/* map of filename -> stackdriver_debugger_snapshot[] */
HashTable *snapshots_by_file;
/* map of snapshot id -> stackdriver_debugger_snapshot */
HashTable *snapshots_by_id;
/* map of snapshot id -> stackdriver_debugger_snapshot */
HashTable *collected_snapshots_by_id;
/* map of filename -> stackdriver_debugger_logpoint[] */
HashTable *logpoints_by_file;
/* map of snapshot id -> stackdriver_debugger_logpoint */
HashTable *logpoints_by_id;
/* array of stackdriver_debugger_message_t */
HashTable *collected_messages;
/* array of pointers to ast node types */
HashTable *ast_to_clean;
double time_spent;
double request_start;
size_t memory_used;
size_t max_memory;
zend_bool opcache_enabled;
ZEND_END_MODULE_GLOBALS(stackdriver_debugger)
extern ZEND_DECLARE_MODULE_GLOBALS(stackdriver_debugger)
#ifdef ZTS
#define STACKDRIVER_DEBUGGER_G(v) TSRMG(stackdriver_debugger_globals_id, zend_stackdriver_debugger_globals *, v)
#else
#define STACKDRIVER_DEBUGGER_G(v) (stackdriver_debugger_globals.v)
#endif
#endif /* PHP_STACKDRIVER_H */