Add opam file

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add backtrace design document

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Register an exception printer for API_ERROR

This means that Printexc.to_string will print the full parameter list
rather than just '_'.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Remove the exnhook: it's gone

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Use new Debug.with_thread_named API

This replaces the leak-friendly 'name_thread' function.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
The generated OCaml code should use Backtrace.reraise

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update to new Backtrace manipulation APIs

- call Backtrace.is_important in exception handlers to prevent
  accidentally forgetting where we came from
- avoid calling log_exception all over the place -- we want single
  backtraces not lots of fragments
- update taskHelper.failed to take the exception, so it can later
  fetch the backtrace and process it.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Xenops: unmarshal the backtrace from failed Tasks and rethrow

This allows xenopsd backtraces to be joined up with xapi backtraces.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
XenAPI: Add Task.backtrace, and populate it when a task is failed

The field will contain an s-expression encoded Backtrace.t value. It
should be considered an opaque value.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xe: support a '--trace' option

If '--trace' is provided then, if a failure occurs, a backtrace will be
fetched from the Task and printed.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #1999 from djs55/add-backtraces

Support reliable, cross-host, cross-process backtraces
CA-148234: Don't leak socket if fixing cookie fails

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
doc: rename docs to doc to match xenopsd

Signed-off-by: David Scott <dave.scott@citrix.com>
doc: rename evolution/ to futures/ to match xenopsd

Signed-off-by: David Scott <dave.scott@citrix.com>
doc: add basic skeleton matching Xenopsd

Signed-off-by: David Scott <dave.scott@citrix.com>
docs: convert the XenAPI evolution design to markdown

Signed-off-by: David Scott <dave.scott@citrix.com>
docs: correct the link to the evolution document

Signed-off-by: David Scott <dave.scott@citrix.com>
docs: XenAPI evolution: remove ``latex''-ism

Signed-off-by: David Scott <dave.scott@citrix.com>
doc: describe some of the memory accounting

Signed-off-by: David Scott <dave.scott@citrix.com>
doc: link the memory accounting into the index

Signed-off-by: David Scott <dave.scott@citrix.com>