Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
7c41b76e
Commit
7c41b76e
authored
Jun 12, 2017
by
Jan Hubicka
Committed by
Jan Hubicka
Jun 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cgraph.c (cgraph_node::dump): Complain about profile insanities.
From-SVN: r249123
parent
6cddb61c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletions
+38
-1
gcc/ChangeLog
+4
-0
gcc/cgraph.c
+34
-1
No files found.
gcc/ChangeLog
View file @
7c41b76e
2017
-
06
-
11
Jan
Hubicka
<
hubicka
@
ucw
.
cz
>
*
cgraph
.
c
(
cgraph_node
::
dump
):
Complain
about
profile
insanities
.
2017
-
06
-
12
Doug
Rupp
<
rupp
@
adacore
.
com
>
2017
-
06
-
12
Doug
Rupp
<
rupp
@
adacore
.
com
>
*
config
.
gcc
(*-*-
vxworks
*):
Set
use_gcc_stdint
to
"provide"
.
*
config
.
gcc
(*-*-
vxworks
*):
Set
use_gcc_stdint
to
"provide"
.
...
...
gcc/cgraph.c
View file @
7c41b76e
...
@@ -2094,7 +2094,7 @@ cgraph_node::dump (FILE *f)
...
@@ -2094,7 +2094,7 @@ cgraph_node::dump (FILE *f)
fprintf
(
f
,
" Function flags:"
);
fprintf
(
f
,
" Function flags:"
);
if
(
count
.
initialized_p
())
if
(
count
.
initialized_p
())
{
{
fprintf
(
f
,
"
profile_count
"
);
fprintf
(
f
,
"
count:
"
);
count
.
dump
(
f
);
count
.
dump
(
f
);
}
}
if
(
origin
)
if
(
origin
)
...
@@ -2172,10 +2172,13 @@ cgraph_node::dump (FILE *f)
...
@@ -2172,10 +2172,13 @@ cgraph_node::dump (FILE *f)
fprintf
(
f
,
" Called by: "
);
fprintf
(
f
,
" Called by: "
);
profile_count
sum
=
profile_count
::
zero
();
for
(
edge
=
callers
;
edge
;
edge
=
edge
->
next_caller
)
for
(
edge
=
callers
;
edge
;
edge
=
edge
->
next_caller
)
{
{
fprintf
(
f
,
"%s "
,
edge
->
caller
->
dump_name
());
fprintf
(
f
,
"%s "
,
edge
->
caller
->
dump_name
());
edge
->
dump_edge_flags
(
f
);
edge
->
dump_edge_flags
(
f
);
if
(
edge
->
count
.
initialized_p
())
sum
+=
edge
->
count
;
}
}
fprintf
(
f
,
"
\n
Calls: "
);
fprintf
(
f
,
"
\n
Calls: "
);
...
@@ -2186,6 +2189,36 @@ cgraph_node::dump (FILE *f)
...
@@ -2186,6 +2189,36 @@ cgraph_node::dump (FILE *f)
}
}
fprintf
(
f
,
"
\n
"
);
fprintf
(
f
,
"
\n
"
);
if
(
count
.
initialized_p
())
{
bool
ok
=
true
;
bool
min
=
false
;
ipa_ref
*
ref
;
FOR_EACH_ALIAS
(
this
,
ref
)
if
(
dyn_cast
<
cgraph_node
*>
(
ref
->
referring
)
->
count
.
initialized_p
())
sum
+=
dyn_cast
<
cgraph_node
*>
(
ref
->
referring
)
->
count
;
if
(
global
.
inlined_to
||
(
symtab
->
state
<
EXPANSION
&&
ultimate_alias_target
()
==
this
&&
only_called_directly_p
()))
ok
=
!
count
.
differs_from_p
(
sum
);
else
if
(
count
>
profile_count
::
from_gcov_type
(
100
)
&&
count
<
sum
.
apply_scale
(
99
,
100
))
ok
=
false
,
min
=
true
;
if
(
!
ok
)
{
fprintf
(
f
,
" Invalid sum of caller counts "
);
sum
.
dump
(
f
);
if
(
min
)
fprintf
(
f
,
", should be at most "
);
else
fprintf
(
f
,
", should be "
);
count
.
dump
(
f
);
fprintf
(
f
,
"
\n
"
);
}
}
for
(
edge
=
indirect_calls
;
edge
;
edge
=
edge
->
next_callee
)
for
(
edge
=
indirect_calls
;
edge
;
edge
=
edge
->
next_callee
)
{
{
if
(
edge
->
indirect_info
->
polymorphic
)
if
(
edge
->
indirect_info
->
polymorphic
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment