1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-28 19:04:27 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-03 17:28:06 +09:00
parent 0eef87dfe4
commit a2486a384f
2 changed files with 5 additions and 9 deletions

10
main.cc
View File

@ -760,10 +760,6 @@ int main(int argc, char **argv) {
error("failed to write to the output file: " + toString(std::move(e)));
}
int num_input_chunks = 0;
for (ObjectFile *file : files)
num_input_chunks += file->sections.size();
{
MyTimer t("unlink_wait");
tg_unlink.wait();
@ -781,9 +777,7 @@ int main(int argc, char **argv) {
llvm::outs() << toString(isec) << "\n";
#endif
#if 1
llvm::outs() << " input_chunks=" << num_input_chunks << "\n"
<< "output_chunks=" << output_chunks.size() << "\n"
llvm::outs() << "output_chunks=" << output_chunks.size() << "\n"
<< " files=" << files.size() << "\n"
<< " filesize=" << filesize << "\n"
<< " num_all_syms=" << num_all_syms << "\n"
@ -795,8 +789,8 @@ int main(int argc, char **argv) {
<< "num_relocs_alloc=" << num_relocs_alloc << "\n"
<< " num_str=" << num_string_pieces << "\n";
Counter::print();
llvm::TimerGroup::printAll(llvm::outs());
#endif
llvm::outs().flush();
_exit(0);

4
mold.h
View File

@ -582,6 +582,7 @@ private:
//
class Counter {
public:
Counter(StringRef name) : name(name) {
static std::mutex mu;
std::lock_guard lock(mu);
@ -593,8 +594,9 @@ class Counter {
value++;
}
void print();
static void print();
private:
StringRef name;
std::atomic_uint32_t value;