mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-12 09:00:09 +08:00
Print correct values in tcc_print_stats (yarpgen v1)
Value 0 and values >2GB where printed wrong during tests with yarpgen (v1) Starting the output with a hashtag make it compatible to TAP -- Regards ... Detlef
This commit is contained in:
parent
afa05caacf
commit
e7262accb6
12
libtcc.c
12
libtcc.c
@ -2161,23 +2161,21 @@ LIBTCCAPI void tcc_set_options(TCCState *s, const char *r)
|
||||
|
||||
PUB_FUNC void tcc_print_stats(TCCState *s1, unsigned total_time)
|
||||
{
|
||||
if (total_time < 1)
|
||||
if (!total_time)
|
||||
total_time = 1;
|
||||
if (total_bytes < 1)
|
||||
total_bytes = 1;
|
||||
fprintf(stderr, "* %d idents, %d lines, %d bytes\n"
|
||||
"* %0.3f s, %u lines/s, %0.1f MB/s\n",
|
||||
fprintf(stderr, "# %d idents, %d lines, %u bytes\n"
|
||||
"# %0.3f s, %u lines/s, %0.1f MB/s\n",
|
||||
total_idents, total_lines, total_bytes,
|
||||
(double)total_time/1000,
|
||||
(unsigned)total_lines*1000/total_time,
|
||||
(double)total_bytes/1000/total_time);
|
||||
fprintf(stderr, "* text %u, data.rw %u, data.ro %u, bss %u bytes\n",
|
||||
fprintf(stderr, "# text %u, data.rw %u, data.ro %u, bss %u bytes\n",
|
||||
s1->total_output[0],
|
||||
s1->total_output[1],
|
||||
s1->total_output[2],
|
||||
s1->total_output[3]
|
||||
);
|
||||
#ifdef MEM_DEBUG
|
||||
fprintf(stderr, "* %d bytes memory used\n", mem_max_size);
|
||||
fprintf(stderr, "# %d bytes memory used\n", mem_max_size);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user