- May 14, 2014
-
-
Tomasz Grabiec authored
First couple of frames always come from trace logging functions. I think we should not show them because they do not add any information. There was already a list of function names which should be filtered out. This is not appropriate in this case because tracing goes through a function named 'log' which is a pretty generic name and could as well be an application symbol, so we cannot just filter out all functions named 'log. This patch adds support for knocking off a leading sequence of frames form the backtrace which is more accurate and seems good enough. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Sampler will need to set and later restore value of this option. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Tracepoints can be enbaled not only via enable_tracepoint(std::string) but via tracepoint_base::enable() also. This change also makes the initialization thread-safe as it may be called from aribtrary thread. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Some functionality from the zfs and zpool commands require some functions contained in zfs_prop.c and zpool_prop.c. This patch solves this problem by adding the files as part of the libzfs compilation process. Currently, OSv fall into the 'failed to lookup symbol' scenario when using certain parameters from the aforementioned commands, e.g.: scripts/run.py -e 'zfs.so list osv' _OPENSOLARIS_SYS_UIO_H_ was added to CFLAGS to fix a confliction where 'struct uio' was being defined twice (Glauber Costa). Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Takuya ASADA authored
Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Takuya ASADA authored
Resolve and demangle symbol name of RIP, show it. Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Takuya ASADA authored
Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Takuya ASADA authored
lookup_name_demangled() lookups a symbol name, demangle it, then snprintf onto preallocated buffer. Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
KANATSU Minoru authored
Signed-off-by:
KANATSU Minoru <icc.pot.tyew272@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
KANATSU Minoru authored
Signed-off-by:
KANATSU Minoru <icc.pot.tyew272@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
KANATSU Minoru authored
add symbol to libc for port CRuby Signed-off-by:
KANATSU Minoru <icc.pot.tyew272@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
KANATSU Minoru authored
Signed-off-by:
KANATSU Minoru <icc.pot.tyew272@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Claudio Fontana authored
an effect of commit 9bbbe9dc is that no output is possible before prio 'console' initializers have been run. This change allows to have at least one API available really early (from boot code and premain). Document the requirements for the early console class regarding the write() method. Signed-off-by:
Claudio Fontana <claudio.fontana@huawei.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- May 13, 2014
-
-
Glauber Costa authored
While running one of the redis benchmarks, I saw around 23k calls to malloc_large. Among those, ~10 - 11k were 2-page sized. I managed to track it down to the creation of net channels. The problem here is that the net channel structure is slightly larger than half a page - the maximum size for small object pools. That will throw all allocations into malloc_large. Besides being slow, it also wastes a page for every net channel created, since malloc_large will include an extra page in the beginning of each allocation. This patch fixes this by overloading the operators new and delete for the netchannel structure so that we use the more efficient and less wasteful alloc_page. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- May 12, 2014
-
-
Tomasz Grabiec authored
This change aims to reduce the likelihood of running into issue merged stream may not be. If samples cross CPUs and the CPU of the second sample has its earliest sample after the first sample, we ignore that pair as the second sample has a high chance of belonging to other pair. This change does not solve the problem completly because there may be a situation when sample which was recorded on another CPU was discarded and the next sample will be again on the first CPU. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
This command shows a duration profile like 'prof-wait' or 'prof-lock' but is more generic, it can work with any timed traces. 'trace prof-wait' is equivalent of 'trace prof-timed -t sched_wait' 'trace prof-lock' is equivalent of 'trace prof-timed -t mutex_lock_wait' Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
The algorithm was duplicated between 'prof-wait','prof-lock' and 'list timed','summary --timed'. This change unifies all paths. As a side effect, mutex_lock_wait/mutex_lock_wake pair is now recognized as timed sample and appears in 'summary --timed' and 'trace list-timed' This refactoring will also make it easy to declare timed samples which are correlated by data rather than calling thread. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Broken by commit 1e53a52f. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
Export the shrinker interface to C users. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Reviewed-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dmitry Fleytman authored
Due to a global variable in image type definition code small instance directive becomes sticky and applies automatically to all further images of the batch. Fixed by making the variable local. Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Claudio Fontana authored
implement a simple interrupt table with descriptors which record interrupt IDs, handlers and interrupt type. Signed-off-by:
Claudio Fontana <claudio.fontana@huawei.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Jaspal Singh Dhillon authored
Fixes #282 Signed-off-by:
Jaspal Singh Dhillon <jaspal.iiith@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Traceback (most recent call last): File "/home/tgrabiec/src/osv/scripts/loader.py", line 1165, in invoke show_leak() File "/home/tgrabiec/src/osv/scripts/loader.py", line 1104, in show_leak si = syminfo(f) File "/home/tgrabiec/src/osv/scripts/loader.py", line 117, in syminfo return symbol_formatter(syminfo_resolver(addr)) TypeError: object() takes no parameters Error occurred in Python command: object() takes no parameters Reported-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
pthread_mutex uses lazy_indirect object to allocate actual object on a first use. The lazily allocated object is not destroyed unless pthread_mutex_destroy is called. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- May 09, 2014
-
-
Tomasz Grabiec authored
That formatter is used for ad-hoc printing of samples, eg. in error messages. This fixes the following error message: Traceback (most recent call last): File "scripts/trace.py", line 576, in <module> args.func(args) File "scripts/trace.py", line 244, in prof_lock show_profile(args, get_profile) File "scripts/trace.py", line 208, in show_profile max_levels=args.max_levels) File "/home/tgrabiec/src/osv/scripts/osv/prof.py", line 170, in print_profile for sample in samples: File "/home/tgrabiec/src/osv/scripts/osv/prof.py", line 108, in get_duration_profile raise Exception('Double entry:\n%s\n%s\n' % (str(old), str(trace))) File "/home/tgrabiec/src/osv/scripts/osv/trace.py", line 125, in __str__ return self.format() File "/home/tgrabiec/src/osv/scripts/osv/trace.py", line 122, in format bt_formatter(self.backtrace)) File "/home/tgrabiec/src/osv/scripts/osv/trace.py", line 32, in __call__ frames = list(debug.resolve_all(self.resolver, (x - 1 for x in backtrace if x))) File "/home/tgrabiec/src/osv/scripts/osv/debug.py", line 107, in resolve_all return itertools.chain.from_iterable(map(resolver, raw_addresses)) TypeError: __init__() takes exactly 1 argument (2 given) When this should actually be printed: Traceback (most recent call last): File "scripts/trace.py", line 576, in <module> args.func(args) File "scripts/trace.py", line 244, in prof_lock show_profile(args, get_profile) File "scripts/trace.py", line 208, in show_profile max_levels=args.max_levels) File "/data/tgrabiec/osv/scripts/osv/prof.py", line 170, in print_profile for sample in samples: File "/data/tgrabiec/osv/scripts/osv/prof.py", line 108, in get_duration_profile raise Exception('Double entry:\n%s\n%s\n' % (str(old), str(trace))) Exception: Double entry: 0xffffc00017668010 3 1399542568.505835772 mutex_lock_wait (...) 0xffffc00017668010 1 1399542574.668642044 mutex_lock_wait (...) Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Jaspal Singh Dhillon authored
This patch fixes the case of silently hanging of OSv when >64 cpus are provided. Signed-off-by:
Jaspal Singh Dhillon <jaspal.iiith@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- May 08, 2014
-
-
Nadav Har'El authored
OSv is currently limited to 64 vCPUs, because we use a 64-bit bitmask for wakeups (see max_cpus in sched.cc). Having exactly 64 CPUs *should* work, but unfortunately didn't because of a bug: cpu_set::operator++ first incremented the index, and then called advance() to find the following one-bit. We had a bug when the index was 63: we then expect operator++ to return 64 (end(), signaling the end of the iteration), but what happened was that after it incremented the index to 64, advance() wrongly handled the case idx=64 (1<<64 returns 1, unexpectedly) and moved it back to idx=63. The patch fixes operator++ to not call advance when idx=64 is reached, so now it works correctly also for idx=63, and booting with 64 CPUs now works. Fixes #234. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Claudio Fontana authored
add include <osv/prio.hh>, this time at the beginning of the file. Signed-off-by:
Claudio Fontana <claudio.fontana@huawei.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Implement three of the Linux functions we're still missing (see issue #77 for a list of more things to do). These are pretty easy to add, because we just need to correctly call the lower layer functions, sys_*, which already exist. This patch also adds tests for the three functions to tst-readdir.cc. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Our readdir_r() and friends were implemented in libc/dir.cc, calling a function "ll_readdir()" from fs/vfs/main.cc. The name of this function was confusing ("ll_" seemed to imply lock-less, which it isn't), and the way it was "extern"ed was ugly, as a comment even admitted. Moreover, when we want to implement more missing functions like rewinddir() (see issue #77), we need to write more of these silly "ll_*" wrapper functions. Instead, let's just move the few dir.cc functions into main.cc. The latter already defines most of our filesystem system calls, so feels the right place anyway. This change allows us to get rid of the silly ll_readdir() layer, and makes implementing rewinddir() trivial (see next patch). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Claudio Fontana authored
remove a spurious include <osv/prio.hh> which seems to be a merge artifact. Signed-off-by:
Claudio Fontana <claudio.fontana@huawei.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Jaspal Singh Dhillon authored
This patch changes the definition of __assert_fail() in api/assert.h which would allow it and other header files which include it (such as debug.hh) to be used in mgmt submodules. Fixes conflict with declaration of __assert_fail() in external/x64/glibc.bin/usr/include/assert.h Signed-off-by:
Jaspal Singh Dhillon <jaspal.iiith@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- May 07, 2014
-
-
Takuya ASADA authored
Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
This change moves syncache_head construction to its constructor so that the timer can be nicely embedded in the structure. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Takuya ASADA authored
Now we enabled both VGA and serial, we nolonger need to add --vga cmdline for VMW/VBox. Reviewed-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
According to the manual page, the nsec field from both it_value and it_interval must be checked, if wrong, return EINVAL. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pawel Dziepak authored
The return values of LOCK() and UNLOCK() are never used. Besides, in the current Musl version these macros do not have return values at all. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pawel Dziepak <pdziepak@quarnos.org> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-