modules: Remove httpserver.so from mgmt

httpserver.so does not build propery for many:

  LINK httpserver
  /usr/bin/ld: cannot find -lboost_system-mt
  /usr/bin/ld: cannot find -lboost_filesystem-mt
  /usr/bin/ld: cannot find -lboost_program_options-mt
  collect2: error: ld returned 1 exit status

drop it from osv.git build until it does.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Document clock::time() and fix its implementation on kvmclock

Our clock::time() function returns the current wall-clock time (number of
nanoseconds since the Unix epoch). We never clearly documented this, so this
patch adds this documentation.

Moreover, in kvmclock, we assumed that the host never adjusts its
wall-clock time, which is not a good assumption because it prevents us
from benefiting from NTP running on the host. As Avi Kivity explains:

   "For the wall clock, you need to sample the wall clock base every time,
    since it can be changed by the host."

So this patch changes kvmclock::time() to sample the wall-clock-at-boot
reported by the paravirtual clock, on every time() call, and not just once.

The downsite of this patch is that clock::get::time(), and therefore
nanotime(), become a bit slower on kvmclock, as they need to sample
the wall_clock_boot() every time, require a couple of barriers and
arithmetic operations. But note that we shouldn't even be using the
non-monotonic clock::get::time() for our timers - we should be using the
monotonic clock::get::uptime() - and when we switch to using that we'll
get back the bit of performance lost in this patch.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: remove WritingPacker.offset

It's a left over which is not used any more.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: improve help

 - added command descriptions
 - improved clarity of options
 - extracted argument groups
 - changed command help to start with lower case letter

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: exit silently when stdout pipe is broken

When output is not fully consumed because of piping, eg to `head`,
we get an ugly exception:

 Traceback (most recent call last):
   File "scripts/trace.py", line 274, in <module>
     args.func(args)
   File "scripts/trace.py", line 227, in list_timed
     bt_formatter(t.backtrace),
 IOError: [Errno 32] Broken pipe

Let's ignore it, it's normal condition.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: add `summary` command

Prints output like this:

Collected 36843 samples spanning 8.85 s

Tracepoint statistics:

  name              count
  ----              -----
  sched_wait        18420
  sched_wait_ret    18423

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: use call-site instead of return-site in flat backtrace

The call-graph tree is already using call-sites, this makes also
`trace.py list -b` also use it.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: move trace related commands from loader.py to trace.py

Removing 'osv trace summary' and 'osv trace duration' commands from
loader.py. The first is added as 'trace.py summary --timed', the
second one is added as 'trace.py list-timed'.

It was easier to move both in one commit as they are coupled with each
other.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: move TimeRange from prof.py to trace.py

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: make time slicing options available in trace listing

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: introduce '--period' time slicing option

This:

  --since 10.0 --period 100ms

is now equivalent to:

  --since 10.0 --until 10.1

This option makes it easier to slice the time based on the output of
'trace.py list-timed' which prints trace timestamp and duration.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: accept time units in --since and --until

The timestamp typically will come from 'trace.py list' output.  This
change makes it easier to paste the timestamp. Listing prints the time
with '.' separating seconds from nanoseconds.  The options '--since'
and '--until' accept timestamp in nanoseconds so the dot must have
been removed. Now one only needs to append the 's' suffix which
changes the unit to seconds.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: make -t option required for prof command

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: get rid of unnecessary int_or_none()

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
libc: Make RLIMIT_STACK 1 MB in size

Currently, RLIMIT_STACK is 64 KB.  This is too small for the JVM which
limits stack size to RLIMIT_STACK if a VMA range that covers address
found in '__libc_stack_end' in /proc/self/maps.

So in preparation for procfs support, bump up RLIMIT_STACK to 1 MB.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs: 'struct file' to VOP_READ

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: procfs

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
procfs

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs: mount procfs at boot

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
procfs: clean up includes

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>