- Apr 29, 2013
-
-
Guy Zana authored
-
Guy Zana authored
-
Avi Kivity authored
Instead of specifying /foo/some/common/path/name: /bar/some/common/path/name say /foo/&/some/common/path/name: /bar/& The '/&/' tells mkbootfs where the common name begins; everything after that is substituted for '&' in the host filesystem filename.
-
Nadav Har'El authored
Implement or stub the rest of the pthread functions which libstdc++ assumes exist when pthread_cancel() exists. In particular, implement pthread_equal() which libstdc++ needs to implement thread::joinable().
-
Avi Kivity authored
Needed for libawt.so.
-
Avi Kivity authored
Fixes libawt.so startup.
-
Avi Kivity authored
needed for dladdr().
-
Nadav Har'El authored
Added "-e cmdline" option to scripts/run, which changes the chosen image (depending on the -d option) to run the given command line. For example, scripts/run -d -e "java.so -jar something.jar" Note that the -e option changes the image's default command line, so running scripts/run without -e will later run the same command line again.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
Helps the jvm output an error message after failing to load a native library.
-
Avi Kivity authored
-
Avi Kivity authored
syntax: /internal/path/name/**: /host/path/name/**
-
- Apr 28, 2013
-
-
Arnon Kanfi authored
-
Arnon Kanfi authored
-
Arnon Kanfi authored
-
Arnon Kanfi authored
-
Arnon Kanfi authored
-
Arnon Kanfi authored
-
Arnon Kanfi authored
-
Arnon Kanfi authored
-
Nadav Har'El authored
Libstdc++ checks (in its inline function __gthread_active_p()) whether the pthread_cancel() function exists in the library, to decide if this is a multi-threaded program - and if it isn't, makes some locking-related decisions we'll probably regret later ;-) So it is important to add pthread_cancel(), even if just a stub as in this patch. But once we add pthread_cancel(), libstdc++ starts using pthread_once() to ensure that some initialization (e.g., of locale) happens exactly once. We can't stupidly stub it to do nothing, or initialization will never happen, so this patch includes a full implementation of pthread_once().
-
Avi Kivity authored
Setting it up where it is not available (e.g. Xen) will crash.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
We free the page, then remove it from the page table; but other cpus can still access it during that window, when it may already be allocated to someone else. Change the order, and add a FIXME for the TLB flush.
-
Avi Kivity authored
We often build a pte in a temporary variable and then assign it to the hardware page table atomically. The compiler however is allowed to build the pte directly in its destination. Mark the access as volatile to prevent the compiler from doing this.
-
Avi Kivity authored
Xen does not allow us to write directly to page tables, so create a class to represent a pointer to a pte, and require all pte access to use this class.
-
Avi Kivity authored
Reduces duplicate code.
-
Avi Kivity authored
Avoid permissions changing gradually, instead change them all at once. Especially important for Xen where each change is a trap. Note: the compiler can still undo this, since ptep is not volatile. This will be fixed later.
-
Avi Kivity authored
Xen is forcing strange games with ptes (page frames are suddenly machine addresses; permissions change) so we need to encapsulate any access to PTEs. Change pt_element to a class to catch any direct access to the underlying value.
-
Avi Kivity authored
In large pages, bit 12 is used for the PAT, while in small pages or nonleaf pages it is used for the page address. Provide a level parameter to pte_phys(), and create a new pte_phys_nonleaf(), to do the masking correctly. This doesn't affect anything since we don't use the PAT; but it is not impossible that Xen does.
-
Avi Kivity authored
2 is usual, 3 with 1GB pages, 1 on Xen (possibly later extended to 2).
-
Avi Kivity authored
Apparently the Xen loader does this relocation for us and clears the entry.
-
Avi Kivity authored
Needed to pass metadata to Xen.
-
- Apr 25, 2013
-
-
Nadav Har'El authored
This code is ugly enough - it didn't actually need the loor or switch to make it even uglier ;-)
-
Nadav Har'El authored
-
Nadav Har'El authored
My previous implementation of backtrace() didn't work when Java was running (see comments in the code in this commit for an explanation why), so I wrote a third (!) implementation of backtrace() which does work in Java, and now leak detection can be done in both Java and our own tests .so's. Please note that backtrace() now relies on frame pointers, which are currently omitted in the "release" build - so it can only be used now in the "debug" build. Seeing we only use backtrace() for leak detection, I guess this is acceptable for now. A reminder on how to use leak detection - the easiest thing is to add the "--leak" command line paramter to the loader, to have it start leak detection when entering the payload (not during OSv boot): $ make -j4 mode=debug $ scripts/imgedit.py setargs build/release/loader.img --leak java.so Try3 $ scripts/run -d (this will run java/Try3.class - use whatever command line you want ;-)). Let it run till the end, and then $ gdb build/debug/loader.elf (gdb) connect (gdb) osv syms (gdb) set logging on (gdb) set height 0 (gdb) osv leak show Please note that "osv leak show" can take a L-O-N-G time - even a few minutes, as Java allocates myriads of objects that GDB will now have to inspect. In a simple test I did, more than 18689 allocations from 1300 different call chains were alive at the end, and printing all of this takes time (so does looking at it... eventually I'll add better tools for finding the most suspicious blocks).
-
Nadav Har'El authored
Added to the loader a command-line option "--leak" to enable the leak detector immediately before running the payload's main(). For example, to look for leaks in tst-fpu.so (there are none, by the way ;-)), do scripts/imgedit.py setargs build/release/loader.img --leak tests/tst-fpu.so and when it ends, look at the leak detection results: $ gdb build/release/loader.elf (gdb) connect (gdb) osv leak show Unfortunately, this doesn't work when the payload is Java - I'm still trying to figure out why.
-
Guy Zana authored
-