Cachegrind: a cache and branch-prediction profiler
--------------------------------------------------------------------------------
-- User-annotated source: concord.c
--------------------------------------------------------------------------------
Ir
I1mr ILmr Dr
D1mr
DLmr
Dw
D1mw
DLmw
.
.
.
.
.
.
.
.
.
void init_hash_table(char *file_name, Word_Node *table[])
3
1
1
.
.
.
1
0
0
{
.
.
.
.
.
.
.
.
.
FILE *file_ptr;
.
.
.
.
.
.
.
.
.
Word_Info *data;
1
0
0
.
.
.
1
1
1
int line = 1, i;
.
.
.
.
.
.
.
.
.
5
0
0
.
.
.
3
0
0
data = (Word_Info *) create(sizeof(Word_Info));
.
.
.
.
.
.
.
.
.
4,991
0
0
1,995
0
0
998
0
0
for (i = 0; i < TABLE_SIZE; i++)
3,988
1
1
1,994
0
0
997
53
52
table[i] = NULL;
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
/* Open file, check it. */
6
0
0
1
0
0
4
0
0
file_ptr = fopen(file_name, "r");
2
0
0
1
0
0
.
.
.
if (!(file_ptr)) {
.
.
.
.
.
.
.
.
.
fprintf(stderr, "Couldn’t open ’%s’.\n", file_name);
1
1
1
.
.
.
.
.
.
exit(EXIT_FAILURE);
.
.
.
.
.
.
.
.
.
}
.
.
.
.
.
.
.
.
.
165,062
1
1
73,360
0
0
91,700
0
0
while ((line = get_word(data, line, file_ptr)) != EOF)
146,712
0
0
73,356
0
0
73,356
0
0
insert(data->;word, data->line, table);
.
.
.
.
.
.
.
.
.
4
0
0
1
0
0
2
0
0
free(data);
4
0
0
1
0
0
2
0
0
fclose(file_ptr);
3
0
0
2
0
0
.
.
.
}
(Although column widths are automatically minimised, a wide terminal is clearly useful.)
Each source file is clearly marked (
User-annotated source
) as having been chosen manually for annotation.
If the file was found in one of the directories specified with the
-I
/
--include
option, the directory and file are both
given.
Each line is annotated with its event counts. Events not applicable for a line are represented by a dot. This is useful
for distinguishing between an event which cannot happen, and one which can but did not.
Sometimes only a small section of a source file is executed. To minimise uninteresting output, Cachegrind only shows
annotated lines and lines within a small distance of annotated lines. Gaps are marked with the line numbers so you
know which part of a file the shown code comes from, eg:
82
Содержание BBV
Страница 176: ...Valgrind FAQ Release 3 8 0 10 August 2012 Copyright 2000 2012 Valgrind Developers Email valgrind valgrind org ...
Страница 177: ...Valgrind FAQ Table of Contents Valgrind Frequently Asked Questions 1 ii ...
Страница 302: ...README mips based on newer GCC versions if possible 95 ...
Страница 303: ...GNU Licenses ...
Страница 304: ...GNU Licenses Table of Contents 1 The GNU General Public License 1 2 The GNU Free Documentation License 8 ii ...