message: Update call_trace middleware to include a counter.
diff: @@ -2,8 +2,19 @@ use wasmer_runtime_core::{
  codegen::{Event, EventSink, FunctionMiddleware, InternalEvent},
  module::ModuleInfo,
  };
  +use std::sync::{Arc, atomic::{Ordering, AtomicU32}};
  -pub struct CallTrace;
  +pub struct CallTrace {
  + counter: Arc<AtomicU32>,
  +}
  +
  +impl CallTrace {
  + pub fn new() -> CallTrace {
  + CallTrace {
  + counter: Arc::new(AtomicU32::new(0)),
  + }
  + }
  +}
  impl FunctionMiddleware for CallTrace {
  type Error = String;
  @@ -13,10 +24,13 @@ impl FunctionMiddleware for CallTrace {
  _module_info: &ModuleInfo,
  sink: &mut EventSink<'a, 'b>,
  ) -> Result<(), Self::Error> {
  + let counter = self.counter.clone();
  +
  match op {
  Event::Internal(InternalEvent::FunctionBegin(id)) => sink.push(Event::Internal(
  InternalEvent::Breakpoint(Box::new(move |_| {
  - eprintln!("func ({})", id);
  + let idx = counter.fetch_add(1, Ordering::SeqCst);
  + eprintln!("[{}] func ({})", idx, id);
  Ok(())
  })),
  )),
  