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
114e78f8
Commit
114e78f8
authored
Dec 18, 2001
by
Jan Hubicka
Committed by
Jan Hubicka
Dec 18, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* libgcc2.c (__bb_exit_func): Kill -ax dumping code.
From-SVN: r48159
parent
b1bf2706
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
134 deletions
+9
-134
gcc/ChangeLog
+4
-0
gcc/libgcc2.c
+5
-134
No files found.
gcc/ChangeLog
View file @
114e78f8
Tue
Dec
18
16
:
37
:
42
CET
2001
Jan
Hubicka
<
jh
@suse
.
cz
>
*
libgcc2
.
c
(
__bb_exit_func
)
:
Kill
-
ax
dumping
code
.
2001
-
12
-
18
Jason
Merrill
<
jason
@redhat
.
com
>
2001
-
12
-
18
Jason
Merrill
<
jason
@redhat
.
com
>
C
++
ABI
change
:
destroy
value
arguments
in
caller
.
C
++
ABI
change
:
destroy
value
arguments
in
caller
.
...
...
gcc/libgcc2.c
View file @
114e78f8
...
@@ -1332,21 +1332,16 @@ static int num_digits (long long value, int base) __attribute__ ((const));
...
@@ -1332,21 +1332,16 @@ static int num_digits (long long value, int base) __attribute__ ((const));
void
void
__bb_exit_func
(
void
)
__bb_exit_func
(
void
)
{
{
FILE
*
da_file
,
*
file
;
FILE
*
da_file
;
long
time_value
;
long
time_value
;
int
i
;
int
i
;
struct
bb
*
ptr
;
if
(
bb_head
==
0
)
if
(
bb_head
==
0
)
return
;
return
;
i
=
strlen
(
bb_head
->
filename
)
-
3
;
i
=
strlen
(
bb_head
->
filename
)
-
3
;
if
(
!
strcmp
(
bb_head
->
filename
+
i
,
".da"
))
{
/* Must be -fprofile-arcs not -a.
Dump data in a form that gcov expects. */
struct
bb
*
ptr
;
for
(
ptr
=
bb_head
;
ptr
!=
(
struct
bb
*
)
0
;
ptr
=
ptr
->
next
)
for
(
ptr
=
bb_head
;
ptr
!=
(
struct
bb
*
)
0
;
ptr
=
ptr
->
next
)
{
{
...
@@ -1425,7 +1420,8 @@ __bb_exit_func (void)
...
@@ -1425,7 +1420,8 @@ __bb_exit_func (void)
if
(
__read_gcov_type
(
&
v
,
da_file
,
8
)
!=
0
)
if
(
__read_gcov_type
(
&
v
,
da_file
,
8
)
!=
0
)
{
{
fprintf
(
stderr
,
"arc profiling: Can't read output file %s.
\n
"
,
fprintf
(
stderr
,
"arc profiling: Can't read output file %s.
\n
"
,
ptr
->
filename
);
ptr
->
filename
);
break
;
break
;
}
}
...
@@ -1460,7 +1456,7 @@ __bb_exit_func (void)
...
@@ -1460,7 +1456,7 @@ __bb_exit_func (void)
{
{
if
(
__write_gcov_type
(
*
count_ptr
,
da_file
,
8
)
!=
0
)
if
(
__write_gcov_type
(
*
count_ptr
,
da_file
,
8
)
!=
0
)
{
{
ret
=
1
;
ret
=
1
;
break
;
break
;
}
}
count_ptr
++
;
count_ptr
++
;
...
@@ -1476,131 +1472,6 @@ __bb_exit_func (void)
...
@@ -1476,131 +1472,6 @@ __bb_exit_func (void)
}
}
return
;
return
;
}
/* Must be basic block profiling. Emit a human readable output file. */
file
=
fopen
(
"bb.out"
,
"a"
);
if
(
!
file
)
perror
(
"bb.out"
);
else
{
struct
bb
*
ptr
;
/* This is somewhat type incorrect, but it avoids worrying about
exactly where time.h is included from. It should be ok unless
a void * differs from other pointer formats, or if sizeof (long)
is < sizeof (time_t). It would be nice if we could assume the
use of rationale standards here. */
time
((
void
*
)
&
time_value
);
fprintf
(
file
,
"Basic block profiling finished on %s
\n
"
,
ctime
((
void
*
)
&
time_value
));
/* We check the length field explicitly in order to allow compatibility
with older GCC's which did not provide it. */
for
(
ptr
=
bb_head
;
ptr
!=
(
struct
bb
*
)
0
;
ptr
=
ptr
->
next
)
{
int
i
;
int
func_p
=
(
ptr
->
nwords
>=
(
long
)
sizeof
(
struct
bb
)
&&
ptr
->
nwords
<=
1000
&&
ptr
->
functions
);
int
line_p
=
(
func_p
&&
ptr
->
line_nums
);
int
file_p
=
(
func_p
&&
ptr
->
filenames
);
int
addr_p
=
(
ptr
->
addresses
!=
0
);
long
ncounts
=
ptr
->
ncounts
;
gcov_type
cnt_max
=
0
;
long
line_max
=
0
;
long
addr_max
=
0
;
int
file_len
=
0
;
int
func_len
=
0
;
int
blk_len
=
num_digits
(
ncounts
,
10
);
int
cnt_len
;
int
line_len
;
int
addr_len
;
fprintf
(
file
,
"File %s, %ld basic blocks
\n\n
"
,
ptr
->
filename
,
ncounts
);
/* Get max values for each field. */
for
(
i
=
0
;
i
<
ncounts
;
i
++
)
{
const
char
*
p
;
int
len
;
if
(
cnt_max
<
ptr
->
counts
[
i
])
cnt_max
=
ptr
->
counts
[
i
];
if
(
addr_p
&&
(
unsigned
long
)
addr_max
<
ptr
->
addresses
[
i
])
addr_max
=
ptr
->
addresses
[
i
];
if
(
line_p
&&
line_max
<
ptr
->
line_nums
[
i
])
line_max
=
ptr
->
line_nums
[
i
];
if
(
func_p
)
{
p
=
(
ptr
->
functions
[
i
])
?
(
ptr
->
functions
[
i
])
:
"<none>"
;
len
=
strlen
(
p
);
if
(
func_len
<
len
)
func_len
=
len
;
}
if
(
file_p
)
{
p
=
(
ptr
->
filenames
[
i
])
?
(
ptr
->
filenames
[
i
])
:
"<none>"
;
len
=
strlen
(
p
);
if
(
file_len
<
len
)
file_len
=
len
;
}
}
addr_len
=
num_digits
(
addr_max
,
16
);
cnt_len
=
num_digits
(
cnt_max
,
10
);
line_len
=
num_digits
(
line_max
,
10
);
/* Now print out the basic block information. */
for
(
i
=
0
;
i
<
ncounts
;
i
++
)
{
#if LONG_TYPE_SIZE == GCOV_TYPE_SIZE
fprintf
(
file
,
" Block #%*d: executed %*ld time(s)"
,
blk_len
,
i
+
1
,
cnt_len
,
ptr
->
counts
[
i
]);
#else
fprintf
(
file
,
" Block #%*d: executed %*lld time(s)"
,
blk_len
,
i
+
1
,
cnt_len
,
ptr
->
counts
[
i
]);
#endif
if
(
addr_p
)
fprintf
(
file
,
" address= 0x%.*lx"
,
addr_len
,
ptr
->
addresses
[
i
]);
if
(
func_p
)
fprintf
(
file
,
" function= %-*s"
,
func_len
,
(
ptr
->
functions
[
i
])
?
ptr
->
functions
[
i
]
:
"<none>"
);
if
(
line_p
)
fprintf
(
file
,
" line= %*ld"
,
line_len
,
ptr
->
line_nums
[
i
]);
if
(
file_p
)
fprintf
(
file
,
" file= %s"
,
(
ptr
->
filenames
[
i
])
?
ptr
->
filenames
[
i
]
:
"<none>"
);
fprintf
(
file
,
"
\n
"
);
}
fprintf
(
file
,
"
\n
"
);
fflush
(
file
);
}
fprintf
(
file
,
"
\n\n
"
);
fclose
(
file
);
}
}
}
void
void
...
...
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