Ruby
2.5.0dev(2017-10-22revision60238)
Main Page
Related Pages
Modules
+
Data Structures
Data Structures
Data Structure Index
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
$
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
y
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
debug_counter.c
Go to the documentation of this file.
1
/**********************************************************************
2
3
debug_counter.c -
4
5
created at: Tue Feb 21 16:51:18 2017
6
7
Copyright (C) 2017 Koichi Sasada
8
9
**********************************************************************/
10
11
#include "
debug_counter.h
"
12
#include <stdio.h>
13
14
#if USE_DEBUG_COUNTER
15
#include "
internal.h
"
16
17
static
const
char
*
const
debug_counter_names[] = {
18
""
19
#define RB_DEBUG_COUNTER(name) #name,
20
#include "
debug_counter.h
"
21
#undef RB_DEBUG_COUNTER
22
};
23
24
size_t
rb_debug_counter[
numberof
(debug_counter_names)];
25
26
__attribute__((destructor))
27
static
void
28
rb_debug_counter_show_results(
void
)
29
{
30
const
char
*
env
=
getenv
(
"RUBY_DEBUG_COUNTER_DISABLE"
);
31
if
(env ==
NULL
|| strcmp(
"1"
, env) != 0) {
32
int
i;
33
for
(i=0; i<
RB_DEBUG_COUNTER_MAX
; i++) {
34
fprintf(stderr,
"[RUBY_DEBUG_COUNTER]\t%s\t%"
PRIuSIZE
"\n"
,
35
debug_counter_names[i],
36
rb_debug_counter[i]);
37
}
38
}
39
}
40
41
#endif
/* USE_DEBUG_COUNTER */
RB_DEBUG_COUNTER_MAX
Definition:
debug_counter.h:191
numberof
#define numberof(array)
Definition:
etc.c:618
internal.h
getenv
#define getenv(name)
Definition:
win32.c:71
PRIuSIZE
#define PRIuSIZE
Definition:
ruby.h:177
debug_counter.h
env
#define env
NULL
#define NULL
Definition:
_sdbm.c:102
Generated by
1.8.13