aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Overhaul logging system in runtimeMarijn Haverbeke2011-04-191-4/+5
| | | | | | | | | | | | | | See https://github.com/graydon/rust/wiki/Logging-vision The runtime logging categories are now treated in the same way as modules in compiled code. Each domain now has a log_lvl that can be used to restrict the logging from that domain (will be used to allow logging to be restricted to a single domain). Features dropped (can be brought back to life if there is interest): - Logger indentation - Multiple categories per log statement - I possibly broke some of the color code -- it confuses me
* Add a proper check for rustbootMarijn Haverbeke2011-04-181-4/+2
| | | | Uncomment log initialization.
* Temporarily turn off logging initializationMarijn Haverbeke2011-04-181-3/+4
| | | | | Will be restored as soon as I find a way for the runtime to figure out whether it is on rustboot or rustc.
* Update foregoing patches to leave rust_crate alone.Marijn Haverbeke2011-04-181-2/+4
| | | | | | | | | Apparently it can't live in the main binary, since on non-Linux platforms, dynamics libs won't find symbols in the binary. This removes the crate_map pointer from rust_crate again, and instead passes it as an extra argument to rust_start. Rustboot doesn't pass this argument, but supposedly that's okay as long as we don't actually use it on that platform.
* Make log the log level configurable per moduleMarijn Haverbeke2011-04-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This overloads the meaning of RUST_LOG to also allow 'module.submodule' or 'module.somethingelse=2' forms. The first turn on all logging for a module (loglevel 3), the second sets its loglevel to 2. Log levels are: 0: Show only errors 1: Errors and warnings 2: Errors, warnings, and notes 3: Everything, including debug logging Right now, since we only have one 'log' operation, everything happens at level 1 (warning), so the only meaningful thing that can be done with the new RUST_LOG support is disable logging (=0) for some modules. TODOS: * Language support for logging at a specific level * Also add a log level field to tasks, query the current task as well as the current module before logging (log if one of them allows it) * Revise the C logging API to conform to this set-up (globals for per-module log level, query the task level before logging, stop using a global mask) Implementation notes: Crates now contain two extra data structures. A 'module map' that contains names and pointers to the module-log-level globals for each module in the crate that logs, and a 'crate map' that points at the crate's module map, as well as at the crate maps of all external crates it depends on. These are walked by the runtime (in rust_crate.cpp) to set the currect log levels based on RUST_LOG. These module log globals are allocated as-needed whenever a log expression is encountered, and their location is hard-coded into the logging code, which compares the current level to the log statement's level, and skips over all logging code when it is lower.
* Move to macro-based logging checks in the C++ codeMarijn Haverbeke2011-04-071-2/+2
| | | | | No functions should be called for log statements that turn out to be inactive.
* Add ABI tagging to crates, adjust rustc output and runtime stack-frame setup ↵Graydon Hoare2011-02-221-3/+5
| | | | so access to argv works.
* Lots of design changes around proxies and message passing. Made it so that ↵Michael Bebenita2010-09-071-40/+45
| | | | domains can only talk to other domains via handles, and with the help of the rust_kernel.
* Added a few utility classes, cleaned up the include order of .h files, and ↵Michael Bebenita2010-09-071-1/+2
| | | | started to make the Rust kernel own domain message queues rather than the Rust domains themselves.
* Pulled rust_srv in its own file. Some cleanup, and added varargs to ↵Michael Bebenita2010-08-161-105/+0
| | | | assertion macros.
* Merge commit 'jyasskin/work'Graydon Hoare2010-08-101-1/+1
|\ | | | | | | | | | | Conflicts: src/rt/rust_dom.cpp src/rt/rust_upcall.cpp
| * Add names to tasks and domains. These can either be an explicit literal stringJeffrey Yasskin2010-08-091-1/+1
| | | | | | | | | | after the "spawn" keyword, or implicitly the call expression used to start the spawn.
* | Changed array_list::replace() return behavior.Michael Bebenita2010-08-091-3/+5
|/
* Fix typos in comments, delete obsolete comments and dead commented code.Michael Bebenita2010-07-281-6/+0
|
* Add a warning interface to rust_srv.Michael Bebenita2010-07-281-0/+10
|
* Move allocation-tracking into rust_srv.Michael Bebenita2010-07-281-10/+11
|
* Added a message passing system based on lock free queues for inter-thread ↵Michael Bebenita2010-07-191-48/+1
| | | | communication. Channels now buffer on the sending side, and no longer require blocking when sending. Lots of other refactoring and bug fixes.
* Add another null byte preceding commandline args passed to the root task, in ↵Roy Frostig2010-07-151-1/+1
| | | | position of closure/obj pointer.
* Fix bug in win32 command-line arg processing.Graydon Hoare2010-07-041-1/+1
|
* Populate tree.Graydon Hoare2010-06-231-0/+267