From patchwork Thu Feb 9 08:20:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 140327 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 28FBFB6EF7 for ; Thu, 9 Feb 2012 19:20:35 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329380436; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=JU7NjECuXQv0/K+EXOhB3vXi6ZA=; b=O8k1tCvFpBt6tLA k2zYfLOPG0s4soGFKuVW78IKLvdmuCcs3/t6A6ouvikdpHm6WuSZj0vVGfVTDNN3 E60S1s6qLED9yiT+nQzgSfJ/jv/xgiNbC8rx6zMGQIohwyLKpJxwJNDNapgpbRgS Khsb6xxVneAW/G5I9aomfQ3DYm9s= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=yitXWnKQNCKFuylQacyzv+DqwU6hE254xpkQjVq4OjAgwM533SpDlUtXj+yzyV sB+y54gL9958PJRz6otEOCf8y248jVxe7xU4GxJVbmTWeEb182tKqJivdNO2092o CZxemjyBJfhIwqYYZ24B3FRKab9O6zCNyXY8ubZs7wiSA=; Received: (qmail 24116 invoked by alias); 9 Feb 2012 08:20:28 -0000 Received: (qmail 24091 invoked by uid 22791); 9 Feb 2012 08:20:24 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Feb 2012 08:20:09 +0000 Received: by daln34 with SMTP id n34so1166098dal.20 for ; Thu, 09 Feb 2012 00:20:09 -0800 (PST) Received: by 10.68.223.199 with SMTP id qw7mr3481962pbc.79.1328775609238; Thu, 09 Feb 2012 00:20:09 -0800 (PST) Received: by 10.68.223.199 with SMTP id qw7mr3481944pbc.79.1328775609162; Thu, 09 Feb 2012 00:20:09 -0800 (PST) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net. [71.133.8.30]) by mx.google.com with ESMTPS id 7sm4415799pbw.13.2012.02.09.00.20.07 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Feb 2012 00:20:08 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: libgo patch committed: Update to weekly.2012-02-07 release Date: Thu, 09 Feb 2012 00:20:06 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnTzGnEayF5X8FAmHfn9eEEl2kdlvbVa+jsB7He0oY4h0gvQb2rTYcJXeTdbB7Qlff2hJ16ThfPhVdIDedI6uRhntfGpBMCtvnyMxJWak5RYa879nqCBMwVBcNg/BAHk1brIKyyvAxlDaD1Z8I9Btq0960tojI0AIv6oFA4GEPUoBhOeYA= X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org I have patched libgo to the weekly.2012-02-07 release. As usual this message only contains changes to files specific to gccgo. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 7b3bde10b118 libgo/MERGE --- a/libgo/MERGE Wed Feb 08 14:33:09 2012 -0800 +++ b/libgo/MERGE Thu Feb 09 00:00:42 2012 -0800 @@ -1,4 +1,4 @@ -1107a7d3cb07 +52ba9506bd99 The first line of this file holds the Mercurial revision number of the last merge done from the master library sources. diff -r 7b3bde10b118 libgo/Makefile.am --- a/libgo/Makefile.am Wed Feb 08 14:33:09 2012 -0800 +++ b/libgo/Makefile.am Thu Feb 09 00:00:42 2012 -0800 @@ -226,6 +226,7 @@ $(exp_inotify_gox) \ exp/norm.gox \ exp/proxy.gox \ + exp/signal.gox \ exp/terminal.gox \ exp/types.gox \ exp/utf8string.gox @@ -257,13 +258,11 @@ toolexeclibgoimagedir = $(toolexeclibgodir)/image toolexeclibgoimage_DATA = \ - image/bmp.gox \ image/color.gox \ image/draw.gox \ image/gif.gox \ image/jpeg.gox \ - image/png.gox \ - image/tiff.gox + image/png.gox toolexeclibgoindexdir = $(toolexeclibgodir)/index @@ -327,8 +326,7 @@ toolexeclibgoos_DATA = \ os/exec.gox \ - os/user.gox \ - os/signal.gox + os/user.gox toolexeclibgopathdir = $(toolexeclibgodir)/path @@ -949,7 +947,6 @@ go/crypto/cipher/cipher.go \ go/crypto/cipher/ctr.go \ go/crypto/cipher/io.go \ - go/crypto/cipher/ocfb.go \ go/crypto/cipher/ofb.go go_crypto_des_files = \ go/crypto/des/block.go \ @@ -1107,6 +1104,8 @@ go/exp/proxy/per_host.go \ go/exp/proxy/proxy.go \ go/exp/proxy/socks5.go +go_exp_signal_files = \ + go/exp/signal/signal.go go_exp_terminal_files = \ go/exp/terminal/terminal.go \ go/exp/terminal/util.go @@ -1179,9 +1178,6 @@ go/html/template/transition.go \ go/html/template/url.go -go_image_bmp_files = \ - go/image/bmp/reader.go - go_image_color_files = \ go/image/color/color.go \ go/image/color/ycbcr.go @@ -1203,12 +1199,6 @@ go/image/png/reader.go \ go/image/png/writer.go -go_image_tiff_files = \ - go/image/tiff/buffer.go \ - go/image/tiff/compress.go \ - go/image/tiff/consts.go \ - go/image/tiff/reader.go - go_index_suffixarray_files = \ go/index/suffixarray/qsufsort.go \ go/index/suffixarray/suffixarray.go @@ -1317,9 +1307,6 @@ go/os/user/user.go \ go/os/user/lookup_unix.go -go_os_signal_files = \ - go/os/signal/signal.go - go_path_filepath_files = \ go/path/filepath/match.go \ go/path/filepath/path.go \ @@ -1673,6 +1660,7 @@ exp/html.lo \ exp/norm.lo \ exp/proxy.lo \ + exp/signal.lo \ exp/terminal.lo \ exp/types.lo \ exp/utf8string.lo \ @@ -1693,13 +1681,11 @@ net/http/httptest.lo \ net/http/httputil.lo \ net/http/pprof.lo \ - image/bmp.lo \ image/color.lo \ image/draw.lo \ image/gif.lo \ image/jpeg.lo \ image/png.lo \ - image/tiff.lo \ index/suffixarray.lo \ io/ioutil.lo \ log/syslog.lo \ @@ -1720,7 +1706,6 @@ old/template.lo \ $(os_lib_inotify_lo) \ os/user.lo \ - os/signal.lo \ path/filepath.lo \ regexp/syntax.lo \ net/rpc/jsonrpc.lo \ @@ -2607,6 +2592,16 @@ @$(CHECK) .PHONY: exp/proxy/check +@go_include@ exp/signal.lo.dep +exp/signal.lo.dep: $(go_exp_signal_files) + $(BUILDDEPS) +exp/signal.lo: $(go_exp_signal_files) + $(BUILDPACKAGE) +exp/signal/check: $(CHECK_DEPS) + @$(MKDIR_P) exp/signal + @$(CHECK) +.PHONY: exp/signal/check + @go_include@ exp/terminal.lo.dep exp/terminal.lo.dep: $(go_exp_terminal_files) $(BUILDDEPS) @@ -2776,16 +2771,6 @@ @$(CHECK) .PHONY: hash/fnv/check -@go_include@ image/bmp.lo.dep -image/bmp.lo.dep: $(go_image_bmp_files) - $(BUILDDEPS) -image/bmp.lo: $(go_image_bmp_files) - $(BUILDPACKAGE) -image/bmp/check: $(CHECK_DEPS) - @$(MKDIR_P) image/bmp - @$(CHECK) -.PHONY: image/bmp/check - @go_include@ image/color.lo.dep image/color.lo.dep: $(go_image_color_files) $(BUILDDEPS) @@ -2836,16 +2821,6 @@ @$(CHECK) .PHONY: image/png/check -@go_include@ image/tiff.lo.dep -image/tiff.lo.dep: $(go_image_tiff_files) - $(BUILDDEPS) -image/tiff.lo: $(go_image_tiff_files) - $(BUILDPACKAGE) -image/tiff/check: $(CHECK_DEPS) - @$(MKDIR_P) image/tiff - @$(CHECK) -.PHONY: image/tiff/check - @go_include@ index/suffixarray.lo.dep index/suffixarray.lo.dep: $(go_index_suffixarray_files) $(BUILDDEPS) @@ -3088,16 +3063,6 @@ @$(CHECK) .PHONY: os/user/check -@go_include@ os/signal.lo.dep -os/signal.lo.dep: $(go_os_signal_files) - $(BUILDDEPS) -os/signal.lo: $(go_os_signal_files) - $(BUILDPACKAGE) -os/signal/check: $(CHECK_DEPS) - @$(MKDIR_P) os/signal - @$(CHECK) -.PHONY: os/signal/check - @go_include@ path/filepath.lo.dep path/filepath.lo.dep: $(go_path_filepath_files) $(BUILDDEPS) @@ -3412,6 +3377,8 @@ $(BUILDGOX) exp/proxy.gox: exp/proxy.lo $(BUILDGOX) +exp/signal.gox: exp/signal.lo + $(BUILDGOX) exp/terminal.gox: exp/terminal.lo $(BUILDGOX) exp/types.gox: exp/types.lo @@ -3446,8 +3413,6 @@ hash/fnv.gox: hash/fnv.lo $(BUILDGOX) -image/bmp.gox: image/bmp.lo - $(BUILDGOX) image/color.gox: image/color.lo $(BUILDGOX) image/draw.gox: image/draw.lo @@ -3458,8 +3423,6 @@ $(BUILDGOX) image/png.gox: image/png.lo $(BUILDGOX) -image/tiff.gox: image/tiff.lo - $(BUILDGOX) index/suffixarray.gox: index/suffixarray.lo $(BUILDGOX) @@ -3518,8 +3481,6 @@ $(BUILDGOX) os/user.gox: os/user.lo $(BUILDGOX) -os/signal.gox: os/signal.lo - $(BUILDGOX) path/filepath.gox: path/filepath.lo $(BUILDGOX) @@ -3637,6 +3598,7 @@ $(exp_inotify_check) \ exp/norm/check \ exp/proxy/check \ + exp/signal/check \ exp/terminal/check \ exp/utf8string/check \ html/template/check \ @@ -3656,7 +3618,6 @@ image/draw/check \ image/jpeg/check \ image/png/check \ - image/tiff/check \ index/suffixarray/check \ io/ioutil/check \ log/syslog/check \ @@ -3679,7 +3640,6 @@ old/template/check \ os/exec/check \ os/user/check \ - os/signal/check \ path/filepath/check \ regexp/syntax/check \ sync/atomic/check \ diff -r 7b3bde10b118 libgo/runtime/malloc.h --- a/libgo/runtime/malloc.h Wed Feb 08 14:33:09 2012 -0800 +++ b/libgo/runtime/malloc.h Thu Feb 09 00:00:42 2012 -0800 @@ -235,7 +235,7 @@ }; extern MStats mstats - __asm__ ("libgo_runtime.runtime.MemStats"); + __asm__ ("libgo_runtime.runtime.VmemStats"); // Size classes. Computed and initialized by InitSizes. diff -r 7b3bde10b118 libgo/runtime/mgc0.c --- a/libgo/runtime/mgc0.c Wed Feb 08 14:33:09 2012 -0800 +++ b/libgo/runtime/mgc0.c Thu Feb 09 00:00:42 2012 -0800 @@ -1061,11 +1061,11 @@ runtime_gc(1); } -void runtime_UpdateMemStats(void) - __asm__("libgo_runtime.runtime.UpdateMemStats"); +void runtime_ReadMemStats(MStats *) + __asm__("libgo_runtime.runtime.ReadMemStats"); void -runtime_UpdateMemStats(void) +runtime_ReadMemStats(MStats *stats) { M *m; @@ -1078,6 +1078,7 @@ m->gcing = 1; runtime_stoptheworld(); cachestats(); + *stats = mstats; m->gcing = 0; runtime_semrelease(&gcsema); runtime_starttheworld(false); diff -r 7b3bde10b118 libgo/runtime/proc.c --- a/libgo/runtime/proc.c Wed Feb 08 14:33:09 2012 -0800 +++ b/libgo/runtime/proc.c Thu Feb 09 00:00:42 2012 -0800 @@ -525,7 +525,7 @@ runtime_atomicstorep((void**)&runtime_allm, m); m->id = runtime_sched.mcount++; - m->fastrand = 0x49f6428aUL + m->id; + m->fastrand = 0x49f6428aUL + m->id + runtime_cputicks(); if(m->mcache == nil) m->mcache = runtime_allocmcache(); diff -r 7b3bde10b118 libgo/runtime/runtime.c --- a/libgo/runtime/runtime.c Wed Feb 08 14:33:09 2012 -0800 +++ b/libgo/runtime/runtime.c Thu Feb 09 00:00:42 2012 -0800 @@ -184,6 +184,19 @@ return x; } +int64 +runtime_cputicks(void) +{ +#if defined(__386__) || defined(__x86_64__) + uint32 low, high; + asm("rdtsc" : "=a" (low), "=d" (high)); + return (int64)(((uint64)high << 32) | (uint64)low); +#else + // FIXME: implement for other processors. + return 0; +#endif +} + struct funcline_go_return { String retfile; diff -r 7b3bde10b118 libgo/runtime/runtime.h --- a/libgo/runtime/runtime.h Wed Feb 08 14:33:09 2012 -0800 +++ b/libgo/runtime/runtime.h Thu Feb 09 00:00:42 2012 -0800 @@ -286,6 +286,7 @@ void siginit(void); bool __go_sigsend(int32 sig); int64 runtime_nanotime(void); +int64 runtime_cputicks(void); void runtime_stoptheworld(void); void runtime_starttheworld(bool);