Commit Graph

21549 Commits

Author SHA1 Message Date
bors
a17c7e4f2c auto merge of #8637 : alexcrichton/rust/ifmt-less-hax, r=graydon
Recent improvements to `&mut Trait` have made this work possible, and it solidifies that `ifmt` doesn't always have to return a string, but rather it's based around writers.
2013-08-24 19:21:17 -07:00
bors
f7f1d89649 auto merge of #8607 : sfackler/rust/extensions, r=brson
The method names in std::rt::io::extensions::WriterByteConversions are
the same as those in std::io::WriterUtils and a resolve error causes
rustc to fail after trying to find an impl of io::Writer instead of
trying to look for rt::io::Writer as well.
2013-08-24 18:11:19 -07:00
Alex Crichton
a3e39b9454 Introduce alternate forms of logging
These new macros are all based on format! instead of fmt! and purely exist for
bootstrapping purposes. After the next snapshot, all uses of logging will be
migrated to these macros, and then after the next snapshot after that we can
drop the `2` suffix on everything
2013-08-24 17:07:30 -07:00
bors
8c25b7f0e8 auto merge of #8740 : brson/rust/rt-opt, r=thestinger
See #8599
2013-08-24 16:46:24 -07:00
Daniel Micay
e311a1ee02 Merge pull request #8733 from sfackler/str-to-bytes
Add OwnedStr::into_bytes
2013-08-24 16:41:04 -07:00
Brian Anderson
bbe347cee7 std::rt: Enforce sanity a while longer
I'm not comfortable turning off rtassert! yet
2013-08-24 15:46:04 -07:00
Brian Anderson
2690b51350 std: Make vec::push_all_move call reserve_at_least
vec::unshift uses this to add elements, scheduler queues use unshift,
and this was causing a lot of reallocation
2013-08-24 15:46:04 -07:00
Brian Anderson
44c88ddf42 std::rt: Remove an unnecessary allocation from the main sched loop 2013-08-24 15:46:04 -07:00
Brian Anderson
8fc1d9db21 std: Convert the runtime TLS key to a Rust global to avoid FFI 2013-08-24 15:46:03 -07:00
Brian Anderson
a37bdde3f9 std::rt: Remove metrics for perf
These aren't used for anything at the moment and cause some TLS hits
on some perf-critical code paths. Will need to put better thought into
it in the future.
2013-08-24 15:46:03 -07:00
Brian Anderson
0fff8b6549 std::rt: Reduce MessageQueue contention
It's not a huge win but it does reduce the amount of time spent
contesting the message queue when the schedulers are under load
2013-08-24 15:46:03 -07:00
Brian Anderson
5d04234868 std::rt: Reduce SleeperList contention
This makes the lock much less contended. In the test I'm running the
number of times it's contended goes from ~100000 down to ~1000.
2013-08-24 15:46:03 -07:00
Brian Anderson
5bcb639836 std::rt: Remove extra boxes from MessageQueue and SleeperList 2013-08-24 15:46:03 -07:00
Brian Anderson
761f5fba69 std::rt: Optimize TLS use in change_task_context 2013-08-24 15:46:01 -07:00
Brian Anderson
5402786f94 std: More TLS micro-optimization 2013-08-24 15:45:21 -07:00
Steven Fackler
e173a96be0 Add OwnedStr::into_bytes
My primary use case here is sending strings across the wire where the
intermediate storage is a byte array. The new method ends up avoiding a
copy.
2013-08-24 17:37:56 -04:00
Alex Crichton
eb836dd61e Settle on the format/write/print family of names 2013-08-24 12:48:10 -07:00
Alex Crichton
67512f717e Implement a wrapper macro around fprintf -- ifmtf 2013-08-24 12:48:10 -07:00
Alex Crichton
39207a358b Remove ifmt hax and implement fprintf 2013-08-24 12:48:10 -07:00
Daniel Micay
59ca7a88db Merge pull request #8738 from mukilan/master
Force line ending of '.in' files in jemalloc to LF
2013-08-24 11:02:14 -07:00
Mukilan Thiagarajan
dad2ccc9b3 Force line ending of '.in' files in jemalloc to LF
This fixes issue #8731 . On Windows, if the git option core.autocrlf is true (github recommends users to turn on this flag - see https://help.github.com/articles/dealing-with-line-endings), the headers generated from the .in files will have syntatic errors, causing compilation to fail.
2013-08-24 22:20:20 +05:30
bors
c643f1d39c auto merge of #8732 : kballard/rust/str-truncate, r=thestinger 2013-08-24 05:51:21 -07:00
bors
db5615ddd5 auto merge of #8725 : bblum/rust/docs, r=graydon
This documents how to use trait bounds in a (hopefully) user-friendly way, in the containers tutorial, and also documents the task watching implementation for runtime developers in kill.rs.

r anybody
2013-08-24 04:41:24 -07:00
bors
424e8f0fd5 auto merge of #8679 : singingboyo/rust/json-to-impl, r=alexcrichton
to_str, to_pretty_str, to_writer, and to_pretty_writer were at the top
level of extra::json, this moves them into an impl for Json to match
with what's been done for the rest of libextra and libstd.  (or at least for vec and str)

Also meant changing some tests.

Closes #8676.
2013-08-24 03:31:25 -07:00
bors
bb9c71fe82 auto merge of #8722 : graydon/rust/2013-08-23-test-shard, r=msullivan
This makes it relatively easy for us to split testsuite load between machines in buildbot. I've added buildbot-side support for setting up builders with -a.b suffixes (eg. linux-64-opt-vg-0.5, linux-64-opt-vg-1.5, linux-64-opt-vg-2.5, linux-64-opt-vg-3.5, linux-64-opt-vg-4.5 causes the valgrind-supervised testsuite to split 5 ways across hosts).
2013-08-24 02:21:27 -07:00
bors
8bf65a156c auto merge of #8719 : msullivan/rust/cleanup, r=catamorphism
r?
2013-08-24 01:11:28 -07:00
Kevin Ballard
6b4ceff610 Add new function str.truncate() 2013-08-23 22:31:06 -07:00
Brian Anderson
468d023fe9 std: Convert some assert!s to rtassert! 2013-08-23 21:19:59 -07:00
Brian Anderson
30a7a5b8fa Define cfg(rtopt) when optimizing. Turn off runtime sanity checks
Naturally, and sadly, turning off sanity checks in the runtime is
a noticable performance win. The particular test I'm running goes from
~1.5 s to ~1.3s.

Sanity checks are turned *on* when not optimizing, or when cfg
includes `rtdebug` or `rtassert`.
2013-08-23 21:19:59 -07:00
Brian Anderson
4c75d36d0e std: Reduce TLS access 2013-08-23 21:19:59 -07:00
bors
c96b1d89c4 auto merge of #8716 : andrew-d/rust/andrew-fix-warnings, r=alexcrichton
Small, but whatever 🎱
2013-08-23 20:56:27 -07:00
bors
f9979247d1 auto merge of #8705 : brson/rust/lesscxx, r=graydon 2013-08-23 18:41:30 -07:00
Brian Anderson
9cdfe1e603 rt: Remove rust_abi 2013-08-23 18:38:59 -07:00
Brian Anderson
0ee24437ce rt: Remove rust_util.cpp 2013-08-23 18:38:59 -07:00
Brian Anderson
b72c43739d rt: Remove old precise GC code 2013-08-23 18:38:59 -07:00
Brian Anderson
c17447f8b3 rt: Move some test functions to rust_test_helpers 2013-08-23 18:38:59 -07:00
Brian Anderson
4541c6cfe3 rt: Remove exit_status helpers 2013-08-23 18:38:59 -07:00
Brian Anderson
b4ef59db2f rt: Remove sync.h 2013-08-23 18:38:59 -07:00
Brian Anderson
e3419f9c45 rt: Memory regions are never synchronized now 2013-08-23 18:38:59 -07:00
Brian Anderson
0a1baef4f5 rt: Remove timer 2013-08-23 18:38:56 -07:00
bors
7b5a91f4b3 auto merge of #8724 : thestinger/rust/fix-transmute, r=graydon
Monomorphize's normalization results in a 2% decrease in non-optimized
code size for libstd, so there's a negligible cost to removing it. This
also fixes several visit glue bugs because normalize wasn't considering
the differences in visit glue between types.

Closes #8720
2013-08-23 17:26:32 -07:00
Ben Blum
d468b7c0bf Document the task watching / exit code propagation implementation. 2013-08-23 19:55:03 -04:00
Daniel Micay
180e235d3d fix performance regression from invalid IR
Monomorphize's normalization results in a 2% decrease in non-optimized
code size for libstd, so there's a negligible cost to removing it. This
also fixes several visit glue bugs because normalize wasn't considering
the differences in visit glue between types.

Closes #8720
2013-08-23 19:23:54 -04:00
Ben Blum
c678b22276 Talk about trait bounds in the tutorial. 2013-08-23 19:20:34 -04:00
Graydon Hoare
2fb5c49abb test: add support for sharding testsuite by passing --test-shard=a.b 2013-08-23 15:30:23 -07:00
Brian Anderson
a9d28b2d9d rt: Remove indexed_list 2013-08-23 14:46:23 -07:00
Brian Anderson
b3fa43f6e0 rt: Remove rust_exchange_alloc 2013-08-23 14:46:23 -07:00
Brian Anderson
74b2d9e19b rt: Remove last use of C++ exchange alloc 2013-08-23 14:46:23 -07:00
Andrew Dunham
347943640e Fix two small warnings 2013-08-23 17:26:52 -04:00
Steven Fackler
d6eee6a7d2 Rename {Reader,Writer}ByteConversions methods
The method names in std::rt::io::extensions::WriterByteConversions are
the same as those in std::io::WriterUtils and a resolve error causes
rustc to fail after trying to find an impl of io::Writer instead of
trying to look for rt::io::Writer as well.

Same goes for ReaderByteConversions.
2013-08-23 10:53:29 -07:00