1 /* BEGIN INCLUDE FILE ... pfd_format.incl.pl1 */
 2 /* Written June, 1979 by D. Spector.
 3    Modified 12-Sep-79 by M. N. Davidoff to pack msf_ptr_template, add source_path array and null_msf_ptr. */
 4 
 5 /*   Format of profile data (pfd) files:
 6           1. Fixed-length header.
 7           2. Linked list of fixed-length data for each program.
 8           3. For each program, variable-length array of those instructions which call operators.
 9           4. For each program, variable-length array of per-statement profile data values. */
10 
11      dcl     pfd_format_version_1   fixed bin int static options (constant) init (1);
12 
13 /*   Fixed-length header at start of profile data file */
14 
15      dcl     1 pfd_header           aligned based (pfd_ptr),
16                2 version            fixed bin,              /* See pfd format version above */
17                2 mbz                bit (36),               /* Unused */
18                2 date_time_stored   fixed bin (71),
19                2 person_project     char (32) unal,
20                2 comment            char (128) unal,
21                2 first_program      like msf_ptr_template;  /* Msf pointer to first program data */
22 
23 /*   Data for one program or component */
24 
25      dcl     1 program              aligned based (program_ptr),
26                2 next_program       like msf_ptr_template,  /* Msf pointer to next program data */
27                2 name               char (32) unal,         /* Program name (does not include a language suffix) */
28                2 translator         char (8) unal,          /* Language name */
29                2 flags,
30                  3 long_profile     bit (1) unal,
31                  3 mbz              bit (35) unal,          /* Unused */
32                2 last_source_path   fixed bin (10),
33                2 source_path_array  like msf_ptr_template,
34                2 n_operators        fixed bin (18),
35                2 operator_array     like msf_ptr_template,
36                2 n_values           fixed bin (18),
37                2 value_array        like msf_ptr_template,
38                2 total_count        fixed binary (35),
39                2 total_cost_or_time fixed binary (35),
40                2 total_page_faults  fixed binary (35);      /* (long_profile only) */
41 
42 /*   Array of source segments */
43 
44      dcl     source_path_array      (0:program.last_source_path) char (168) based (source_path_ptr);
45 
46 /*   Arrays of instructions that reference operators */
47 
48      dcl     operator_array         (program.n_operators) bit (36) aligned based (operator_ptr);
49 
50 /*   Arrays of profile data values (sorted by value.source) */
51 
52      dcl     1 value_array          (program.n_values) aligned based (value_ptr),
53                2 source,
54                  3 file             fixed bin (10) unsigned unal,
55                  3 line             fixed bin (16) unsigned unal,
56                  3 statement        fixed bin (5) unsigned unal,
57                  3 pf_entry_seq     fixed bin (5) unsigned unal,
58                2 n_operators        fixed bin (18) unsigned unal,
59                                                             /* Number of operator_array elements for this statement */
60                2 first_operator     fixed bin (18) unsigned unal,
61                                                             /* First operator_array element, if any, for this statement */
62                2 count              fixed bin (35),         /* Execution count */
63                2 cost_or_time       fixed bin (35),         /* Instructions or VCPU time (long_profile) */
64                2 page_faults        fixed bin (35);         /* (long_profile only) */
65 
66 /*   Automatic variables */
67 
68      dcl     operator_ptr           ptr;                    /* Pointer calculated from program.operator_array */
69      dcl     pfd_ptr                ptr;                    /* Pointer to base of pfd file (component 0) */
70      dcl     program_ptr            ptr;                    /* Ptr from pfd_header.first_program or program.next_program */
71      dcl     source_path_ptr        ptr;                    /* Pointer calculated from program.source_path_array */
72      dcl     value_ptr              ptr;                    /* Pointer calculated from program.value_array */
73 
74 /*   Generalized MSF pointer into profile data file */
75 
76      dcl     1 msf_ptr_template     aligned based,
77                2 component          fixed bin (17) unal,
78                2 offset             fixed bin (18) unsigned unal;
79 
80      dcl     1 null_msf_ptr         aligned internal static options (constant),
81                2 component          fixed bin (17) unal initial (-1),
82                2 offset             fixed bin (18) unsigned unal initial (0);
83 
84 /* END INCLUDE FILE ... pfd_format.incl.pl1 */