diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2015-02-24 18:17:57 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2015-02-24 18:17:57 +0800 |
commit | fd6fc0c5f6ec26b3b526655a721b7b0af0b14644 (patch) | |
tree | 487c69cb82b68612b53ad40569a54e060973eca2 /binutils-2.25/gold/descriptors.cc | |
parent | aff326d7fffe9111be0900d433c6de6661c48af3 (diff) | |
download | toolchain_binutils-fd6fc0c5f6ec26b3b526655a721b7b0af0b14644.tar.gz toolchain_binutils-fd6fc0c5f6ec26b3b526655a721b7b0af0b14644.tar.bz2 toolchain_binutils-fd6fc0c5f6ec26b3b526655a721b7b0af0b14644.zip |
Update binutils-2.25/gold to ToT
commit be66981e1605eff305ac9c561825f4bd6801fca2
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Feb 22 05:18:50 2015 -0800
Set GOLD_DEFAULT_SIZE to 32 for x32
* configure.ac (default_size): Set to 32 for x32.
* configure: Regenerated.
Change-Id: I4b2d8927e4e41cf2fac3c92d00e8aef69b5ce21f
Diffstat (limited to 'binutils-2.25/gold/descriptors.cc')
-rw-r--r-- | binutils-2.25/gold/descriptors.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/binutils-2.25/gold/descriptors.cc b/binutils-2.25/gold/descriptors.cc index 2016b7ff..c55d45bb 100644 --- a/binutils-2.25/gold/descriptors.cc +++ b/binutils-2.25/gold/descriptors.cc @@ -1,6 +1,6 @@ // descriptors.cc -- manage file descriptors for gold -// Copyright (C) 2008-2014 Free Software Foundation, Inc. +// Copyright (C) 2008-2015 Free Software Foundation, Inc. // Written by Ian Lance Taylor <iant@google.com>. // This file is part of gold. @@ -28,6 +28,7 @@ #include <fcntl.h> #include <unistd.h> +#include "debug.h" #include "parameters.h" #include "options.h" #include "gold-threads.h" @@ -81,6 +82,9 @@ Descriptors::open(int descriptor, const char* name, int flags, int mode) gold_assert(lock_initialized || descriptor < 0); + if (is_debugging_enabled(DEBUG_FILES)) + this->limit_ = 8; + if (descriptor >= 0) { Hold_lock hl(*this->lock_); @@ -99,6 +103,8 @@ Descriptors::open(int descriptor, const char* name, int flags, int mode) pod->stack_next = -1; pod->is_on_stack = false; } + gold_debug(DEBUG_FILES, "Reused existing descriptor %d for \"%s\"", + descriptor, name); return descriptor; } } @@ -128,6 +134,8 @@ Descriptors::open(int descriptor, const char* name, int flags, int mode) errno = ENOENT; } + gold_debug(DEBUG_FILES, "Opened new descriptor %d for \"%s\"", + new_descriptor, name); return new_descriptor; } @@ -162,6 +170,8 @@ Descriptors::open(int descriptor, const char* name, int flags, int mode) if (this->current_ >= this->limit_) this->close_some_descriptor(); + gold_debug(DEBUG_FILES, "Opened new descriptor %d for \"%s\"", + new_descriptor, name); return new_descriptor; } } @@ -209,6 +219,9 @@ Descriptors::release(int descriptor, bool permanent) pod->is_on_stack = true; } } + + gold_debug(DEBUG_FILES, "Released descriptor %d for \"%s\"", + descriptor, pod->name); } // Close some descriptor. The lock is held when this is called. We @@ -233,6 +246,8 @@ Descriptors::close_some_descriptor() if (::close(i) < 0) gold_warning(_("while closing %s: %s"), pod->name, strerror(errno)); --this->current_; + gold_debug(DEBUG_FILES, "Closed descriptor %d for \"%s\"", + i, pod->name); pod->name = NULL; if (last < 0) this->stack_top_ = pod->stack_next; @@ -265,6 +280,8 @@ Descriptors::close_all() { if (::close(i) < 0) gold_warning(_("while closing %s: %s"), pod->name, strerror(errno)); + gold_debug(DEBUG_FILES, "Closed descriptor %d for \"%s\" (close_all)", + static_cast<int>(i), pod->name); pod->name = NULL; pod->stack_next = -1; pod->is_on_stack = false; |