Skip to content

Commit

Permalink
Remove excessive logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ark0f committed Jul 20, 2023
1 parent ce942bb commit 7862a5b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions lazy-pages/src/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ struct GlobalsAccessWasmRuntime<'a> {

impl<'a> GlobalsAccessor for GlobalsAccessWasmRuntime<'a> {
fn get_i64(&self, name: &LimitedStr) -> Result<i64, GlobalsAccessError> {
log::error!("GlobalsAccessor::get_i64");
self.instance
.get_global_val(name.as_str())
.and_then(|value| match value {
Expand All @@ -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()
Expand Down
3 changes: 0 additions & 3 deletions lazy-pages/src/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 0 additions & 5 deletions sandbox/host/src/sandbox/wasmi_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -457,7 +455,6 @@ pub fn get_global(
globals: &Globals,
name: &str,
) -> Option<Value> {
log::error!("get_global");
let global = exports.get(name).copied()?.into_global()?;
let value = globals.resolve(&global).get();
wasmi_to_ri(value).ok()
Expand All @@ -470,8 +467,6 @@ pub fn set_global(
name: &str,
value: Value,
) -> std::result::Result<Option<()>, error::Error> {
log::error!("set_global");

let Some(Extern::Global(global)) = exports.get(name) else {
return Ok(None);
};
Expand Down

0 comments on commit 7862a5b

Please sign in to comment.