From 7862a5ba0b3b909a9e355d7fb6429fa561f738d9 Mon Sep 17 00:00:00 2001 From: Arseniy Lyashenko Date: Thu, 20 Jul 2023 18:03:02 +0300 Subject: [PATCH] Remove excessive logging --- lazy-pages/src/globals.rs | 2 -- lazy-pages/src/signal.rs | 3 --- sandbox/host/src/sandbox/wasmi_backend.rs | 5 ----- 3 files changed, 10 deletions(-) diff --git a/lazy-pages/src/globals.rs b/lazy-pages/src/globals.rs index 949d200ac16..37eed1cf348 100644 --- a/lazy-pages/src/globals.rs +++ b/lazy-pages/src/globals.rs @@ -51,7 +51,6 @@ struct GlobalsAccessWasmRuntime<'a> { impl<'a> GlobalsAccessor for GlobalsAccessWasmRuntime<'a> { fn get_i64(&self, name: &LimitedStr) -> Result { - log::error!("GlobalsAccessor::get_i64"); self.instance .get_global_val(name.as_str()) .and_then(|value| match value { @@ -62,7 +61,6 @@ impl<'a> GlobalsAccessor for GlobalsAccessWasmRuntime<'a> { } fn set_i64(&mut self, name: &LimitedStr, value: i64) -> Result<(), GlobalsAccessError> { - log::error!("GlobalsAccessor::set_i64"); self.instance .set_global_val(name.as_str(), Value::I64(value)) .ok() diff --git a/lazy-pages/src/signal.rs b/lazy-pages/src/signal.rs index d2bf6d5b729..c9688e27b62 100644 --- a/lazy-pages/src/signal.rs +++ b/lazy-pages/src/signal.rs @@ -80,12 +80,9 @@ unsafe fn user_signal_handler_internal( let page = GearPage::from_offset(ctx, offset); let gas_ctx = if let Some(globals_config) = ctx.globals_context.as_ref() { - log::error!("gas global"); let gas = globals::apply_for_global(globals_config, GlobalNo::GasLimit, |_| Ok(None))?; - log::error!("allowance global"); let allowance = globals::apply_for_global(globals_config, GlobalNo::AllowanceLimit, |_| Ok(None))?; - let gas_left_charger = GasLeftCharger { read_cost: ctx.weight(WeightNo::SignalRead), write_cost: ctx.weight(WeightNo::SignalWrite), diff --git a/sandbox/host/src/sandbox/wasmi_backend.rs b/sandbox/host/src/sandbox/wasmi_backend.rs index 641ebf47547..25c5fdabe30 100644 --- a/sandbox/host/src/sandbox/wasmi_backend.rs +++ b/sandbox/host/src/sandbox/wasmi_backend.rs @@ -430,12 +430,10 @@ pub fn invoke( let results = function.ty(&*store.borrow()).results().len(); let mut results = vec![wasmi::Value::I32(0); results]; SandboxContextStore::using(sandbox_context, || { - log::error!("invoke in SandboxContextStore::using"); function .call(&mut *store.borrow_mut(), &args, &mut results) .map_err(|error| Error::Sandbox(error.to_string())) })?; - log::error!("invoking done"); let results: &[wasmi::Value] = results.as_ref(); match results { @@ -457,7 +455,6 @@ pub fn get_global( globals: &Globals, name: &str, ) -> Option { - log::error!("get_global"); let global = exports.get(name).copied()?.into_global()?; let value = globals.resolve(&global).get(); wasmi_to_ri(value).ok() @@ -470,8 +467,6 @@ pub fn set_global( name: &str, value: Value, ) -> std::result::Result, error::Error> { - log::error!("set_global"); - let Some(Extern::Global(global)) = exports.get(name) else { return Ok(None); };