Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rt/profilegc.d
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ shared static ~this()
{
fprintf(fp, "%15llu\t%15llu\t%8.*s\n",
cast(ulong)c.entry.size, cast(ulong)c.entry.count,
c.name.length, c.name.ptr);
cast(int) c.name.length, c.name.ptr);
}
if (logfilename.length)
fclose(fp);
}
else
fprintf(stderr, "cannot write profilegc log file '%.*s'", logfilename.length, logfilename.ptr);
fprintf(stderr, "cannot write profilegc log file '%.*s'", cast(int) logfilename.length, logfilename.ptr);
}
}
10 changes: 5 additions & 5 deletions src/rt/trace.d
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private void trace_place(FILE* fpdef, Symbol* s, ulong count)
if (!(s.Sflags & SFvisited))
{
//printf("\t%.*s\t%llu\n", s.Sident.length, s.Sident.ptr, count);
fprintf(fpdef,"\t%.*s\n", s.Sident.length, s.Sident.ptr);
fprintf(fpdef,"\t%.*s\n", cast(int) s.Sident.length, s.Sident.ptr);
s.Sflags |= SFvisited;

// Compute number of items in array
Expand Down Expand Up @@ -240,13 +240,13 @@ private size_t trace_report(FILE* fplog, Symbol* s)
ulong count = 0;
for (auto sp = s.Sfanin; sp; sp = sp.next)
{
fprintf(fplog,"\t%5llu\t%.*s\n", sp.count, sp.sym.Sident.length, sp.sym.Sident.ptr);
fprintf(fplog,"\t%5llu\t%.*s\n", sp.count, cast(int) sp.sym.Sident.length, sp.sym.Sident.ptr);
count += sp.count;
}
fprintf(fplog,"%.*s\t%llu\t%lld\t%lld\n", s.Sident.length, s.Sident.ptr, count, s.totaltime, s.functime);
fprintf(fplog,"%.*s\t%llu\t%lld\t%lld\n", cast(int) s.Sident.length, s.Sident.ptr, count, s.totaltime, s.functime);
for (auto sp = s.Sfanout; sp; sp = sp.next)
{
fprintf(fplog,"\t%5llu\t%.*s\n", sp.count, sp.sym.Sident.length, sp.sym.Sident.ptr);
fprintf(fplog,"\t%5llu\t%.*s\n", sp.count, cast(int) sp.sym.Sident.length, sp.sym.Sident.ptr);
}
s = s.Sr;
}
Expand Down Expand Up @@ -330,7 +330,7 @@ private void trace_times(FILE* fplog, Symbol*[] psymbols)
pl = s.functime / calls / time_scale;

fprintf(fplog,"%7llu%12lld%12lld%12lld %.*s\n",
calls, tl, fl, pl, id.length, id.ptr);
calls, tl, fl, pl, cast(int) id.length, id.ptr);
}
}

Expand Down