"Fossies" - the Fresh Open Source Software Archive 
Member "FunctionCheck-3.2.0/src/fcdump/fc_dump.h" (26 May 2012, 3402 Bytes) of package /linux/privat/old/FunctionCheck-3.2.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 /*
2 * FunctionCheck profiler
3 * (C) Copyright 2000-2012 Yannick Perret
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 /** fc_dump.h: **/
20
21 #ifndef __fc_dump_h_
22 #define __fc_dump_h_
23
24 #include <stdio.h>
25 #include <stdlib.h>
26
27 #include "fc_global.h"
28 #include "fc_tools.h"
29
30 /** structures **/
31 /* names of a symbol */
32 typedef struct
33 {
34 char *name;
35 char *object;
36 int line;
37 int ok;
38 } FC_Name;
39
40 /* values for the 'ok' field */
41 #define FC_OK_NDEF 0 /* empty */
42 #define FC_OK_OK 1 /* all is done */
43 #define FC_OK_BAD 2 /* not ok, but don't touch it anymore */
44
45 /* functions */
46 typedef struct
47 {
48 void *symbol; /* symbol address */
49 FC_Name name; /* name structure */
50 int calls; /* number of calls */
51 long long int local_time; /* local time */
52 long long int total_time; /* total time */
53 long long int max_time;
54 long long int min_time;
55 long long int max_ltime;
56 long long int min_ltime;
57 int hide; /* do not use this function */
58 void *node; /* the node for this function */
59 int my_index; /* cross reference */
60 } FC_Function;
61
62 /* arcs */
63 typedef struct
64 {
65 void *from, *to;
66 int number;
67 FC_Function *ffrom, *fto;
68 } FC_Arc;
69
70 /* dynamic libraries */
71 typedef struct
72 {
73 void *address;
74 char name[256];
75 } FC_LDyn;
76
77 /* structures for list of functions (name+addr) */
78 typedef struct
79 {
80 char *name; /* function name */
81 char *file; /* corresp. file (not implemented) */
82 void *addr; /* corresp. symbol */
83 } FC_NSym;
84
85 /* max size for a stack */
86 #define FC_MAX_STACK_SIZE 16
87
88 /* structure for memory leaks */
89 typedef struct
90 {
91 void *pointer; /* the memory block */
92 void *alloc_place; /* the allocation place */
93 FC_Name alloc_name; /* name for the malloc */
94 unsigned int size; /* the initial size of the block */
95 void *realloc_place; /* last reallocation place */
96 FC_Name realloc_name; /* name for the realloc */
97 void *alloc_stack[FC_MAX_STACK_SIZE]; /* call-stack for the allocation */
98 FC_Name *stack_name; /* names for the call-stack */
99 } FC_MLeak;
100
101 /* structure for an invalid free */
102 typedef struct
103 {
104 void *pointer; /* the memory block given */
105 void *free_place; /* the free place */
106 FC_Name free_name; /* name for the free */
107 void *free_stack[FC_MAX_STACK_SIZE]; /* call-stack for the free */
108 FC_Name *stack_name; /* names for the call-stack */
109 } FC_MFree;
110
111 /* structure for an invalid realloc */
112 typedef struct
113 {
114 void *pointer; /* the memory block given */
115 void *realloc_place; /* the realloc place */
116 FC_Name realloc_name; /* name for the realloc */
117 void *realloc_stack[FC_MAX_STACK_SIZE]; /* call-stack for the realloc */
118 FC_Name *stack_name; /* names for the call-stack */
119 } FC_MRealloc;
120
121 #endif /* __fc_dump_h_ */