Commit Graph

18567 Commits

Author SHA1 Message Date
Brian Anderson
3208fc36bf Merge remote-tracking branch 'brson/io-wip' into io
Conflicts:
	src/libstd/rt/sched.rs
	src/libstd/rt/task.rs
	src/libstd/rt/test.rs
	src/libstd/task/mod.rs
	src/libstd/task/spawn.rs
2013-06-15 19:31:46 -07:00
Brian Anderson
505ef7e710 std::rt: Tasks contain a JoinLatch 2013-06-15 19:00:44 -07:00
Brian Anderson
b08c446798 Merge remote-tracking branch 'toddaaro/io' into io 2013-06-15 17:00:36 -07:00
toddaaro
d1ec8b5fb8 redesigned the pinning to pin deal with things on dequeue, not on enqueue 2013-06-14 12:17:56 -07:00
Brian Anderson
90fbe38f00 std::rt: Tasks must have an unwinder. Simpler 2013-06-13 23:18:49 -07:00
Brian Anderson
fd148cd3e2 std::rt: Change the Task constructors to reflect a tree 2013-06-13 23:18:49 -07:00
Brian Anderson
abc3a8aa1e std::rt: Add JoinLatch
This is supposed to be an efficient way to link the lifetimes
of tasks into a tree. JoinLatches form a tree and when `release`
is called they wait on children then signal the parent.

This structure creates zombie tasks which currently keep the entire
task allocated. Zombie tasks are supposed to be tombstoned but that
code does not work correctly.
2013-06-13 23:18:45 -07:00
toddaaro
4224fc7aad added functionality to tell schedulers to refuse to run tasks that are not pinned to them 2013-06-12 14:55:32 -07:00
Brian Anderson
e7213aa21e std::rt: Remove old files 2013-06-12 12:00:46 -07:00
toddaaro
8428081958 A basic implementation of pinning tasks to schedulers. No IO interactions have been planned for, and no forwarding of tasks off special schedulers is supported. 2013-06-12 11:32:22 -07:00
Brian Anderson
84d2695921 std::rt: Work around a dynamic borrowck bug 2013-06-10 17:46:49 -07:00
toddaaro
d64d26cd39 debugged a compiler ICE when merging local::borrow changes into the main io branch and modified the incoming new file lang.rs to be api-compatible 2013-06-10 15:29:02 -07:00
Brian Anderson
d83d38c7fe std::rt: Reduce task stack size to 1MB 2013-06-07 10:23:58 -07:00
Brian Anderson
d4de99aa6c std::rt: Fix a race in the UvRemoteCallback dtor 2013-06-06 17:53:13 -07:00
Brian Anderson
d6ccc6bc99 std::rt: Fix stream test to be parallel 2013-06-06 17:53:13 -07:00
Brian Anderson
8afec77cb0 std::rt: Configure test threads with RUST_TEST_THREADS. Default is ncores x2 2013-06-06 17:53:13 -07:00
Brian Anderson
f9a5005f52 rt: Add rust_get_num_cpus 2013-06-06 17:53:13 -07:00
Brian Anderson
80849e78a8 std: Fix stage0 build
Conflicts:
	src/libstd/rt/comm.rs
2013-06-06 17:53:13 -07:00
Brian Anderson
ece38b3c7e core::rt: Add MegaPipe, an unbounded, multiple producer/consumer, lock-free queue 2013-06-05 22:07:40 -07:00
Brian Anderson
51d257fd9a core::rt: Add SharedPort 2013-06-05 22:07:40 -07:00
Brian Anderson
422f663a98 core::rt: Implement SharedChan 2013-06-05 22:07:39 -07:00
Brian Anderson
1507df87cc std::rt: Remove in incorrect assert 2013-06-05 21:38:58 -07:00
Brian Anderson
f7e242ab8a std::rt: Destroy the task start closure while in task context 2013-06-05 21:38:58 -07:00
Brian Anderson
2e6d51f9ce std::rt: Use AtomicUint instead of intrinsics in comm 2013-06-05 21:38:48 -07:00
Brian Anderson
e2bedb1b86 core: Make atomic methods public 2013-06-05 21:35:39 -07:00
Brian Anderson
ea633b42ae core::rt: deny(unused_imports, unused_mut, unused_variable) 2013-05-30 13:20:17 -07:00
Brian Anderson
053b38e7e1 core::rt: Fix two multithreading bugs and add a threadring test
This properly distributes the load now
2013-05-30 00:18:49 -07:00
Brian Anderson
8eb358bb00 core::rt: Begin recording scheduler metrics 2013-05-30 00:18:07 -07:00
Brian Anderson
ca2eebd5dd core::rt: Add some notes about optimizations 2013-05-29 21:03:21 -07:00
Brian Anderson
f4ed554ddb Merge remote-tracking branch 'brson/io' into incoming
Conflicts:
	src/libstd/rt/sched.rs
2013-05-29 18:22:28 -07:00
Brian Anderson
134bb0f3ee core::rt: Change the signature of context switching methods to avoid infinite recursion 2013-05-29 17:52:00 -07:00
Brian Anderson
f343e6172b core::rt: Fix an infinite recursion bug 2013-05-29 17:25:29 -07:00
Brian Anderson
a373dad74d core::rt: Outline the full multithreaded scheduling algo. Implement sleeping 2013-05-29 17:00:05 -07:00
Brian Anderson
5043ea269d core::rt: Add run_in_mt_newsched_task test function 2013-05-29 16:06:10 -07:00
bors
bd30285c84 auto merge of #6813 : pnkfelix/rust/fsk-issue-6805-ccache-support, r=catamorphism
Fix #6805: add --enable-ccache configure option to prefix compiler invocations with `ccache` to attempt to reuse common results, e.g. for LLVM (re)builds.

The information at developer [Note-ccache](../../wiki/Note-ccache) and at [ccache and clang concerns](http://petereisentraut.blogspot.fr/2011/09/ccache-and-clang-part-2.html) were what drove my introduction of the `-Qunused-arguments` and `CCACHE_CPP2` options.  (Though I did confirm first-hand that at least the first really is necessary.)

Yes, one certainly can re-route how `gcc` and `clang` are resolved in one's PATH and use that as a way to invoke `ccache`.  But I personally do not want to introduce that change to my own PATH, and this seems like a small enough change that it does not hurt to add it, at least for now.  (I don't know what form it would take when we move over to `rustpkg`.)
2013-05-29 15:10:42 -07:00
Felix S. Klock II
2b083373e4 Fix #6805: add --enable-ccache configure option to prefix compiler invocations with ccache to attempt to reuse common results, e.g. for LLVM (re)builds. 2013-05-29 23:18:09 +02:00
Brian Anderson
ed8c3594bc core::rt: Add SleeperList to Scheduler 2013-05-29 14:09:01 -07:00
bors
35655a0fb3 auto merge of #6803 : Thiez/rust/native_fmax_fmin, r=brson
Calls to the libc versions of fmin and fmax were relatively slow (perhaps because they could not be inlined?). This pull request provides f32 and f64 with fmin and fmax written in Rust, and shows a significant speed increase on my system; I used https://github.com/thiez/rustray as my benchmark, with --opt-level 3 it brings the ray-tracing time down from 10.8 seconds to about 9.2, which seemed significant to me.

r?
2013-05-29 13:29:06 -07:00
bors
d2957091c4 auto merge of #6733 : alexcrichton/rust/issue-2400, r=brson
Most of the relevant information can be found in the commit messages.

r? @brson - I just wanted to make sure the make changes aren't completely bogus

This would close #2400, #6517, and #6489 (although a run through incoming-full on linux would have to confirm the latter two)
2013-05-29 12:13:49 -07:00
Matthijs Hofstra
3141acf674 Changed to a more efficient implementation. 2013-05-29 20:21:04 +02:00
bors
562069c12f auto merge of #6800 : june0cho/rust/issue5984, r=pcwalton
Fix #5984.
Resolve the problem which exists in #6780.
2013-05-29 10:55:53 -07:00
Matthijs Hofstra
6cc9a26a2d Replaced calls to external fmin/fmax by a Rust implementation. 2013-05-29 18:26:50 +02:00
bors
a037fa4da3 auto merge of #6796 : sfackler/rust/FromBase64-type-fix, r=bstrie
Previously, FromBase64 was only implemented on ~[u8] and ~str when
any pointer would do. The implementations of FromBase64 are now
consistent with the implementations of ToBase64.
2013-05-29 08:49:53 -07:00
bors
844b5cff36 auto merge of #6794 : thestinger/rust/align_zero, r=pcwalton
This is unlikely to alter optimized codegen much but there's no point in downgrading the known alignment to 1.
2013-05-29 07:32:06 -07:00
bors
e3e55c5c04 auto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatch 2013-05-29 00:52:47 -07:00
bors
149960e0cf auto merge of #6789 : luqmana/rust/compiletest-fix, r=thestinger
Can be removed after a snapshot I believe.
2013-05-28 23:34:48 -07:00
june0cho
14d59af0a3 Fix vec::mut_slice 2013-05-29 15:04:34 +09:00
bors
d80642b519 auto merge of #6784 : nikomatsakis/rust/moves-into-borrowck, r=pcwalton
Move the computation of what data is moved out of `liveness` and into `borrowck`. The resulting code is cleaner, since before we had a split distribution of responsibilities, and also this avoids having multiple implementations of the dataflow code. Liveness is still used to report warnings about useless writes. This will go away when we get the control-flow graph code landed (working on that).

Also adds borrow checker documentation.

Fixes #4384.
Required to support once fns and to properly fix closures (#2202).
First step to generalize our treatment of moves somewhat as well.
2013-05-28 22:16:50 -07:00
bors
e946b4fa3f auto merge of #6778 : Aatch/rust/pass-refactor, r=graydon
Refactor the optimization passes to explicitly use the passes. This commit just re-implements the same passes as were already being run.

It also adds an option (behind `-Z`) to run the LLVM lint pass on the unoptimized IR.

This should close #2812. It is also the first step towards #2396

----------------

This is pretty much just an initial "get it out there" PR. With finer control over the optimization passes coming later. I also just blindly copied the passes we were already doing, so there could almost certainly be some more work in paring it down.

The other thing is the addition of the `mergefunctions` pass, which is currently enabled at `--opt-level=3` and does have a small impact on the code size. However the fact that it is at the end of the optimization pipeline is probably not ideal, so some more experimentation is in order.
2013-05-28 21:01:53 -07:00
James Miller
4ad0b8ac58 Remove extraneous defs from export file 2013-05-29 15:15:42 +12:00