* [PATCH] gcov: rename line_next to next_file_fn in function_info
@ 2016-08-05 12:22 Martin Liška
2016-08-05 12:43 ` Nathan Sidwell
0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2016-08-05 12:22 UTC (permalink / raw)
To: GCC Patches, Nathan Sidwell, Jan Hubicka
[-- Attachment #1: Type: text/plain, Size: 166 bytes --]
Hello.
This corrects a record field name where comment does not correspond to it's name.
make check -k RUNTESTFLAGS="gcov.exp" works fine.
Ready to install?
Martin
[-- Attachment #2: 0001-gcov-rename-line_next-to-next_file_fn-in-function_in.patch --]
[-- Type: text/x-patch, Size: 2753 bytes --]
From 1733e26c619e65ef95604f04f026be0006e9c4e0 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 5 Aug 2016 14:18:47 +0200
Subject: [PATCH] gcov: rename line_next to next_file_fn in function_info
gcc/ChangeLog:
2016-08-05 Martin Liska <mliska@suse.cz>
* gcov.c (output_intermediate_file): Rename
function_info::line_next to next_file_fn.
(process_file): Likewise.
(read_graph_file): Likewise.
(accumulate_line_counts): Likewise.
(output_lines): Likewise.
---
gcc/gcov.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 417b4f4..e1b3372 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -194,7 +194,7 @@ typedef struct function_info
unsigned src;
/* Next function in same source file. */
- struct function_info *line_next;
+ struct function_info *next_file_fn;
/* Next function. */
struct function_info *next;
@@ -667,7 +667,7 @@ output_intermediate_file (FILE *gcov_file, source_t *src)
fprintf (gcov_file, "file:%s\n", src->name); /* source file name */
- for (fn = src->functions; fn; fn = fn->line_next)
+ for (fn = src->functions; fn; fn = fn->next_file_fn)
{
/* function:<name>,<line_number>,<execution_count> */
fprintf (gcov_file, "function:%d,%s,%s\n", fn->line,
@@ -737,10 +737,10 @@ process_file (const char *file_name)
ascending order, so a simple scan is quick. Note we're
building this list in reverse order. */
for (prev = &sources[src].functions;
- (probe = *prev); prev = &probe->line_next)
+ (probe = *prev); prev = &probe->next_file_fn)
if (probe->line <= line)
break;
- fn->line_next = probe;
+ fn->next_file_fn = probe;
*prev = fn;
/* Mark last line in files touched by function. */
@@ -1222,7 +1222,7 @@ read_graph_file (void)
fn->src = src_idx;
fn->line = lineno;
- fn->line_next = NULL;
+ fn->next_file_fn = NULL;
fn->next = NULL;
*fns_end = fn;
fns_end = &fn->next;
@@ -2155,8 +2155,8 @@ accumulate_line_counts (source_t *src)
for (fn = src->functions, fn_p = NULL; fn;
fn_p = fn, fn = fn_n)
{
- fn_n = fn->line_next;
- fn->line_next = fn_p;
+ fn_n = fn->next_file_fn;
+ fn->next_file_fn = fn_p;
}
src->functions = fn_p;
@@ -2433,7 +2433,7 @@ output_lines (FILE *gcov_file, const source_t *src)
for (line_num = 1, line = &src->lines[line_num];
line_num < src->num_lines; line_num++, line++)
{
- for (; fn && fn->line == line_num; fn = fn->line_next)
+ for (; fn && fn->line == line_num; fn = fn->next_file_fn)
{
arc_t *arc = fn->blocks[EXIT_BLOCK].pred;
gcov_type return_count = fn->blocks[EXIT_BLOCK].count;
--
2.9.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gcov: rename line_next to next_file_fn in function_info
2016-08-05 12:22 [PATCH] gcov: rename line_next to next_file_fn in function_info Martin Liška
@ 2016-08-05 12:43 ` Nathan Sidwell
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Sidwell @ 2016-08-05 12:43 UTC (permalink / raw)
To: Martin Liška, GCC Patches, Jan Hubicka
On 08/05/16 08:22, Martin Liška wrote:
> Hello.
>
> This corrects a record field name where comment does not correspond to it's name.
> make check -k RUNTESTFLAGS="gcov.exp" works fine.
>
> Ready to install?
heh, 'line_next' is perfectly good name for the next function. No, wait, it's
stupid!
your patch is fine, thanks!
nathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-05 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-05 12:22 [PATCH] gcov: rename line_next to next_file_fn in function_info Martin Liška
2016-08-05 12:43 ` Nathan Sidwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).