[PATCH] D21166: [wip] COFF: New symbol table design.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 13:14:21 PST 2016
ruiu added a comment.
I think I want to get this in to close the architectural difference between COFF and ELF, and I like it removes the half-baked parallel file parsing.
> So now that I'm able to link chrome_child.dll on Linux it turns out that I get very different results with "perf stat":
>
> Before (median of 5 runs): 11.623297415 seconds time elapsed
> After: 8.123567205 seconds time elapsed
#include <sys/time.h>
static uint64_t microsec(struct timespec Time) {
return Time.tv_sec * 1000000 + (Time.tv_nsec / 1000);
}
void elf::log2(const Twine &Msg) {
static uint64_t Start = 0;
struct timespec Time;
clock_gettime(CLOCK_MONOTONIC, &Time);
if (Start == 0)
Start = microsec(Time);
llvm::errs() << (microsec(Time) - Start) << " " << Msg << "\n";
}
I often add this piece of code to measure time of each pass. This is hacky but still better than `time` command. Did you try to measure this patch on Windows?
================
Comment at: lld/COFF/SymbolTable.cpp:78
if (Config->Verbose)
- outs() << "Reading " << toString(File) << "\n";
+ llvm::outs() << "Reading " << toString(File) << "\n";
+ File->parse();
----------------
Remove `llvm::` from here and other places.
https://reviews.llvm.org/D21166
More information about the llvm-commits
mailing list