Stream: git-wasmtime

Topic: wasmtime / PR #1430 Generate trace logs in wiggle albeit ...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 17:20):

kubkon opened PR #1430 from trace-logs to master:

This commit augments wiggle with trace log generation for the shims,
returned errno values, and returned values proper (if any, i.e.,
different than unit type ()). What that means is that every syscall
will have auto-generated up to 3 traces, for instance,

 TRACE wasi_common::wasi::wasi_snapshot_preview1 > fd_prestat_get(fd=Fd(3))
 TRACE wasi_common::wasi::wasi_snapshot_preview1 >      | result=(buf=Dir(PrestatDir { pr_name_len: 1 }))
 TRACE wasi_common::wasi::wasi_snapshot_preview1 >      | errno=No error occurred. System call completed successfully. (Errno::Success(0))

Putting logging behind a feature gate in this case means that the log calls
are generated by the wiggle crate regardless if the client requested
the feature or not, however, then their usage in the client lib is
dictated by the presence of the feature flag. So, for instance, wasi-common
has this feature enabled by default, while any other client lib
using wiggle if they don't want tracing enabled, they will just
leave the feature off. I'm not sure if this is what we wanted
but seemed easiest to implement quickly. Lemme y'all know your thoughts
about this!

Closes #1420.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 17:20):

kubkon requested alexcrichton and pchickey for a review on PR #1430.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 17:20):

kubkon requested alexcrichton and pchickey for a review on PR #1430.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 17:20):

kubkon edited PR #1430 from trace-logs to master:

This commit augments wiggle with trace log generation for the shims,
returned errno values, and returned values proper (if any, i.e.,
different than unit type ()). What that means is that every syscall
will have auto-generated up to 3 traces, for instance,

 TRACE wasi_common::wasi::wasi_snapshot_preview1 > fd_prestat_get(fd=Fd(3))
 TRACE wasi_common::wasi::wasi_snapshot_preview1 >      | result=(buf=Dir(PrestatDir { pr_name_len: 1 }))
 TRACE wasi_common::wasi::wasi_snapshot_preview1 >      | errno=No error occurred. System call completed successfully. (Errno::Success(0))

Putting logging behind a feature gate in this case means that the log calls
are generated by the wiggle crate regardless if the client requested
the feature or not, however, then their usage in the client lib is
dictated by the presence of the feature flag. So, for instance, wasi-common
has this feature enabled by default, while any other client lib
using wiggle if they don't want tracing enabled, they will just
leave the feature off. I'm not sure if this is what we wanted
but seemed easiest to implement quickly. Lemme y'all know your thoughts
about this!

Closes #1420.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 17:20):

kubkon edited PR #1430 from trace-logs to master:

This commit augments wiggle with trace log generation for the shims,
returned errno values, and returned values proper (if any, i.e.,
different than unit type ()). What that means is that every syscall
will have auto-generated up to 3 traces, for instance,

 TRACE wasi_common::wasi::wasi_snapshot_preview1 > fd_prestat_get(fd=Fd(3))
 TRACE wasi_common::wasi::wasi_snapshot_preview1 >      | result=(buf=Dir(PrestatDir { pr_name_len: 1 }))
 TRACE wasi_common::wasi::wasi_snapshot_preview1 >      | errno=No error occurred. System call completed successfully. (Errno::Success(0))

Putting logging behind a feature flag in this case means that the log calls
are generated by the wiggle crate regardless if the client requested
the feature or not, however, then their usage in the client lib is
dictated by the presence of the feature flag. So, for instance, wasi-common
has this feature enabled by default, while any other client lib
using wiggle if they don't want tracing enabled, they will just
leave the feature off. I'm not sure if this is what we wanted
but seemed easiest to implement quickly. Lemme y'all know your thoughts
about this!

Closes #1420.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 20:30):

marmistrz submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 30 2020 at 15:13):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 30 2020 at 17:58):

kubkon merged PR #1430.


Last updated: Nov 22 2024 at 16:03 UTC