aboutsummaryrefslogtreecommitdiff
path: root/ld/ChangeLog
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-03 03:37:26 +0000
committerMike Frysinger <vapier@gentoo.org>2012-04-03 03:37:26 +0000
commit23916fffce6bac40347fc5a061c9e073e462f943 (patch)
tree85aeab61cb42c3ca488bac57d9500e93475fbf29 /ld/ChangeLog
parentb1c0804b2ea1532cab67ae4d7b288b8e013615c5 (diff)
downloadgdb-23916fffce6bac40347fc5a061c9e073e462f943.zip
gdb-23916fffce6bac40347fc5a061c9e073e462f943.tar.gz
gdb-23916fffce6bac40347fc5a061c9e073e462f943.tar.bz2
ld: optimize vfinfo output slightly
ld atm ends up calling the write() syscall on every char when displaying an error message. For example: $ echo 'main(){foo();}' | strace -f -ewrite gcc -x c -o /dev/null - ... [pid 13035] write(2, ":", 1) = 1 [pid 13035] write(2, " ", 1) = 1 [pid 13035] write(2, "I", 1) = 1 [pid 13035] write(2, "n", 1) = 1 [pid 13035] write(2, " ", 1) = 1 [pid 13035] write(2, "f", 1) = 1 [pid 13035] write(2, "u", 1) = 1 [pid 13035] write(2, "n", 1) = 1 [pid 13035] write(2, "c", 1) = 1 [pid 13035] write(2, "t", 1) = 1 [pid 13035] write(2, "i", 1) = 1 [pid 13035] write(2, "o", 1) = 1 [pid 13035] write(2, "n", 1) = 1 [pid 13035] write(2, " ", 1) = 1 [pid 13035] write(2, "`", 1) = 1 ... That's just to write ": In function `main':". A slight optimization in the vfinfo() func gives a much more reasonable syscall footprint: ... write(2, ": In function `", 15) = 15 ... Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ld/ChangeLog')
-rw-r--r--ld/ChangeLog6
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 9801bda..203f986 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-02 Mike Frysinger <vapier@gentoo.org>
+
+ * ldmisc.c (vfinfo): Assign new local str to fmt. Delete
+ putc call. If str and fmt are different, call fwrite on
+ the difference.
+
2012-03-30 Nick Clifton <nickc@redhat.com>
* po/vi.po: Updated Vietnamese translation.