- Apr 17, 2013
-
-
Avi Kivity authored
Saves ~17MB.
-
Nadav Har'El authored
-
Avi Kivity authored
-
Avi Kivity authored
handle_incoming_wakeups() may not be called from preemptible context, since it manipulates per-cpu variables. Fix by eliminating these calls. In one call site, the call is removed, since it will be called immediately afterwards with interrupts disabled. In the other call site, push the call into an existing irq disabled region. Fixes livelocks where a thread is placed into an incoming_wakeups queue but has the wrong bit set in incoming_wakeups_mask.
-
Avi Kivity authored
-
Avi Kivity authored
Since wake() manipulates per-cpu variables, we need to disable preemption so the cpu pointers aren't invalidated by migration.
-
Avi Kivity authored
The recording mechanism aligns trace messages; replay needs to follow suit.
-
Avi Kivity authored
-
Nadav Har'El authored
Without adding this check, if you change the command line with to run file.so which doesn't exist, it would start using random garbage in memory and fail in mysterious ways. Better just let the user know we can't open the specified program.
-
Nadav Har'El authored
-
Nadav Har'El authored
Added rudimentary support for leak detection. When memory::tracker_enabled is true, an alloc_tracker object (see alloctracker.{cc,hh}) object keeps track of still-living memory allocations and the call chain that led to each. Using a new command in gdb, "osv leak show", a developer can analyze the remaining allocations, with the aim of finding memory leaks (noticing that memory leaks often result in repeptitive allocations from the same call chain). This implementation is a good start (and already found 8 leaks in our code), but it's far from being perfect. It severely slows down the workload, the analysis in gdb is not yet friendly enough (requiring manual inspection to look for the more serious leaks), and the backtrace() implementation also appears to be fragile: In more than one occasion, we noticed a yet-unexplained crash when backtrace() unwinds the stack, calls dl_iterate_hphdr() which throws exception and unwinds the stack again. So this code will probably need more work in the future.
-
Nadav Har'El authored
Add support for ICANON mode a.k.a. "cooked" mode (see termios(3)), where the user's input only reaches the reader after a newline, and until then, the erase character case be used to edit the line. This makes it easier for non-perfect typist to use rhino ;-) Various line-discipline features such as word-erase, line kill, flow control and signals, aren't yet supported in this version. Note how the echo and the line discipline (editing) are now both handled in the console_poll() thread, while previously the echo was handled in the read() implementation (console_read()). This means we now have full read-ahead, i.e., the user can now type before read() starts - even during the OSv boot. This patch also removes the old debugging read() function, which doesn't do anything useful.
-
Avi Kivity authored
-
- Apr 15, 2013
-
-
Guy Zana authored
OSv stalls when using romfs on certain machines so revert back to using bootfs until romfs get fixed
-
- Apr 14, 2013
-
-
Nadav Har'El authored
Make some functions in core/mempool.cc, which should not be accessed from outside this file, static.
-
Nadav Har'El authored
Needlessly aliased std::size_t to size_t (which does nothing but confuse Eclipse), defined a non-existant function, and exposed a function which shouldn't have been exposed.
-
Avi Kivity authored
We have four different implementations, one each for: - no mutex - C mutex - C++ mutex - optional C mutex Unify them into a single template. Keep the interface split so people are forced to pass a mutex, and not some random locking primitive we haven't tested yet.
-
Avi Kivity authored
Rather than polling.
-
Avi Kivity authored
Edge-triggered interrupts only, at present.
-
Avi Kivity authored
This allows us to initialize it a little later.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
Lost during the romfs conversion.
-
Avi Kivity authored
We use a polling thread to collect characters and place them in a queue.
-
Avi Kivity authored
Polling only, no interrupt yet.
-
Guy Zana authored
fo_read() and fo_write().
-
Nadav Har'El authored
sys_read and sys_write used to malloc a 40-byte uio structure, and never freed it. Fixed it by free()ing before returning from these functions.
-
Avi Kivity authored
-
Nadav Har'El authored
object::unload_segments() had a typo - it called load_segment() instead of unload_segment(). This obviously caused a memory leak.
-
- Apr 11, 2013
-
-
Nadav Har'El authored
Implemented a backtrace() function API-compatible with glibc's function with the same name. I need it for the leak detector (to determine which allocations come from the same call tree), but it can also be useful for other things, and perhaps even used by some applications (I am guessing the JVM does not use it, though). My implementation uses the "_Unwind*" functions which are part of gcc's runtime libgcc_s, so they are supposedly correctly synchronized with the way gcc actually keeps track of the call hierarchy. If I understand correctly, these functions use a cut-down version of libunwind which is included in libgcc_s. I also wrote an implementation using libunwind directly (left in the code in #if 0), but couldn't get it to compile because of library dependency hell.
-
Avi Kivity authored
Minor code simplification.
-
Avi Kivity authored
Avoids a zombie.
-
Avi Kivity authored
If we fail to match the file name, we need to release the buffer before bailing out.
-
Avi Kivity authored
We drop the buffer and fetch a new one, but we forget to return the new one to the caller for an eventual brelse(). This results in an assertion failure later on. Fix by making sure the caller sees the new buffer.
-
Avi Kivity authored
-
Avi Kivity authored
This allows running either testrunner.so, or one of the tests (e.g. test/tst-fpu.so), as they now both export the same entry point.
-
Avi Kivity authored
Used when names in an object may conflict with names in other objects.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-