This repository was archived by the owner on Nov 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsample.h
84 lines (70 loc) · 2.16 KB
/
sample.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
#define GROUP 0
#define MODULE 1
#define PRODUCER 2
#define CONSTRUCTION 3
#define TYPE 4
#define NPROFINFO 5
struct hprofinfo {
int hp_magic;
char *hp_info[NPROFINFO];
};
#include "../mcode/magic.h"
typedef struct HPnode2 {
Node11 n11;
struct hprofinfo *hpinf;
} HPnode2;
typedef struct HPnode3 {
Node12 n12;
struct hprofinfo *hpinf;
} HPnode3;
typedef union {
HPnode2 n2;
HPnode3 n3;
Nodevap nvap;
Nodevek nvek;
} HPNode;
typedef struct HPnodefwd {
Tag *tag;
HPNode *forward;
struct HPnodefwd *next;
} HPnodefwd;
extern struct hprofinfo CSYSTEM_SYSTEM_LABEL;
#define SLOP1 ((void *)(&CSYSTEM_SYSTEM_LABEL))
/*#define SLOP2 0*/
double milliseconds;
double atof();
char *ctime();
double sampleinterval;
double nextsampletime;
int noautosample;
int grpresflag; /* groups are restricted */
int modresflag; /* modules are restricted */
int proresflag; /* producers are restricted */
int conresflag; /* constructors are restricted */
int typresflag; /* types are restricted */
int someresflag; /* something is restricted */
int profiling; /* heap profiling requested */
int hashon; /* can be GROUP, MODULE, PRODUCER, */
/* CONSTRUCTION, TYPE */
int gengcmark; /* generate a MARK in the profile file for each gc */
FILE* hpfile; /* graph profile file */
char *hpfilename; /* buffer to build up name */
int sampleflag; /* true if sampling is taking place */
struct restrlist {
char *name;
struct restrlist *next;
};
struct restrlist * grpres; /* restricted groups */
struct restrlist * modres; /* restricted modules */
struct restrlist * prores; /* restricted producers */
struct restrlist * conres; /* restricted constructions */
struct restrlist * typres; /* restricted types */
#ifdef SLOP2
#define HPSET2(p) ((int **)(p))[2] = (int*)SLOP1; ((int **)(p))[3] = SLOP2
#define HPSET3(p) ((int **)(p))[3] = (int*)SLOP1; ((int **)(p))[4] = SLOP2
#else
#define HPSET2(p) ((int **)(p))[2] = (int*)SLOP1
#define HPSET3(p) ((int **)(p))[3] = (int*)SLOP1
#endif
#define SAMPLEMAX 32
#define STARTINTERVAL 0.25