Skip to content

Commit

Permalink
feat: Use latest version of loupe.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Mar 22, 2021
1 parent e2a1dff commit 6eb646e
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/api/src/module.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::store::Store;
use crate::types::{ExportType, ImportType};
use crate::InstantiationError;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use std::fmt;
use std::io;
use std::path::Path;
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler-llvm/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use inkwell::targets::{
};
pub use inkwell::OptimizationLevel as LLVMOptLevel;
use itertools::Itertools;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use std::fmt::Debug;
use std::sync::Arc;
use target_lexicon::Architecture;
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/address_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use crate::lib::std::vec::Vec;
use crate::sourceloc::SourceLoc;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::lib::std::vec::Vec;
use crate::section::{CustomSection, SectionIndex};
use crate::trap::TrapInformation;
use crate::{CompiledFunctionUnwindInfo, FunctionAddressMap, JumpTableOffsets, Relocation};
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
use wasmer_types::entity::PrimaryMap;
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/jump_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! [Learn more](https://en.wikipedia.org/wiki/Branch_table).
use super::CodeOffset;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
use wasmer_types::entity::{entity_impl, SecondaryMap};
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/module.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::lib::std::sync::Arc;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
use wasmer_types::entity::PrimaryMap;
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/relocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::lib::std::fmt;
use crate::lib::std::vec::Vec;
use crate::section::SectionIndex;
use crate::{Addend, CodeOffset, JumpTable};
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
use wasmer_types::entity::PrimaryMap;
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use crate::lib::std::vec::Vec;
use crate::Relocation;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
use wasmer_types::entity::entity_impl;
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/sourceloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! and tracing errors.
use crate::lib::std::fmt;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::error::ParseCpuFeatureError;
use crate::lib::std::str::FromStr;
use crate::lib::std::string::{String, ToString};
use enumset::{EnumSet, EnumSetType};
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
pub use target_lexicon::{
Architecture, BinaryFormat, CallingConvention, Endianness, OperatingSystem, PointerWidth,
Triple,
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/trap.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::CodeOffset;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
use wasmer_vm::TrapCode;
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//!
//! [Learn more](https://en.wikipedia.org/wiki/Call_stack).
use crate::lib::std::vec::Vec;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};

Expand Down
4 changes: 2 additions & 2 deletions lib/engine-jit/src/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::link::link_module;
#[cfg(feature = "compiler")]
use crate::serialize::SerializableCompilation;
use crate::serialize::SerializableModule;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use std::sync::{Arc, Mutex};
use wasmer_compiler::{CompileError, Features, Triple};
#[cfg(feature = "compiler")]
Expand All @@ -31,7 +31,7 @@ use wasmer_vm::{
pub struct JITArtifact {
serializable: SerializableModule,
finished_functions: BoxedSlice<LocalFunctionIndex, FunctionBodyPtr>,
#[memoryusage(ignore)]
#[loupe(skip)]
finished_function_call_trampolines: BoxedSlice<SignatureIndex, VMTrampoline>,
finished_dynamic_function_trampolines: BoxedSlice<FunctionIndex, FunctionBodyPtr>,
signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
Expand Down
2 changes: 1 addition & 1 deletion lib/engine-jit/src/serialize.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use serde::{Deserialize, Serialize};
use wasmer_compiler::{
CompileModuleInfo, CustomSection, Dwarf, FunctionBody, JumpTableOffsets, Relocation,
Expand Down
4 changes: 2 additions & 2 deletions lib/engine-native/src/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use crate::engine::{NativeEngine, NativeEngineInner};
use crate::serialize::ModuleMetadata;
use libloading::{Library, Symbol as LibrarySymbol};
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use std::error::Error;
use std::fs::File;
use std::io::{Read, Write};
Expand Down Expand Up @@ -43,7 +43,7 @@ pub struct NativeArtifact {
sharedobject_path: PathBuf,
metadata: ModuleMetadata,
finished_functions: BoxedSlice<LocalFunctionIndex, FunctionBodyPtr>,
#[memoryusage(ignore)]
#[loupe(skip)]
finished_function_call_trampolines: BoxedSlice<SignatureIndex, VMTrampoline>,
finished_dynamic_function_trampolines: BoxedSlice<FunctionIndex, FunctionBodyPtr>,
signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
Expand Down
2 changes: 1 addition & 1 deletion lib/engine-native/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::NativeArtifact;
use libloading::Library;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use std::path::Path;
use std::sync::Arc;
use std::sync::Mutex;
Expand Down
2 changes: 1 addition & 1 deletion lib/engine-native/src/serialize.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use serde::{Deserialize, Serialize};
use wasmer_compiler::{CompileModuleInfo, SectionIndex, Symbol, SymbolRegistry};
use wasmer_types::entity::{EntityRef, PrimaryMap};
Expand Down
2 changes: 1 addition & 1 deletion lib/engine-object-file/src/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use crate::engine::{ObjectFileEngine, ObjectFileEngineInner};
use crate::serialize::{ModuleMetadata, ModuleMetadataSymbolRegistry};
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use std::collections::BTreeMap;
use std::error::Error;
use std::mem;
Expand Down
2 changes: 1 addition & 1 deletion lib/engine-object-file/src/serialize.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use serde::{Deserialize, Serialize};
use wasmer_compiler::{CompileModuleInfo, SectionIndex, Symbol, SymbolRegistry};
use wasmer_types::entity::{EntityRef, PrimaryMap};
Expand Down
2 changes: 1 addition & 1 deletion lib/engine/src/serialize.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use serde::de::{Deserializer, Visitor};
use serde::ser::Serializer;
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion lib/engine/src/trap/frame_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! FRAME_INFO.register(module, compiled_functions);
//! ```
use crate::serialize::SerializableFunctionFrameInfo;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use std::cmp;
use std::collections::BTreeMap;
use std::sync::{Arc, RwLock};
Expand Down
2 changes: 1 addition & 1 deletion lib/vm/src/global.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::vmcontext::VMGlobalDefinition;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use std::cell::UnsafeCell;
use std::ptr::NonNull;
use std::sync::Mutex;
Expand Down
2 changes: 1 addition & 1 deletion lib/vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub use crate::vmcontext::{
VMTableImport, VMTrampoline,
};
pub use crate::vmoffsets::{TargetSharedSignatureIndex, VMOffsets};
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;

/// Version number of this crate.
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
Expand Down
2 changes: 1 addition & 1 deletion lib/vm/src/libcalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
use crate::probestack::PROBESTACK;
use crate::trap::{raise_lib_trap, Trap, TrapCode};
use crate::vmcontext::VMContext;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use serde::{Deserialize, Serialize};
use std::fmt;
use wasmer_types::{DataIndex, ElemIndex, LocalMemoryIndex, MemoryIndex, TableIndex};
Expand Down
1 change: 0 additions & 1 deletion lib/vm/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use crate::mmap::Mmap;
use crate::vmcontext::VMMemoryDefinition;
use loupe::MemoryUsage;
use loupe_derive::MemoryUsage;
use more_asserts::assert_ge;
use serde::{Deserialize, Serialize};
use std::borrow::BorrowMut;
Expand Down
2 changes: 1 addition & 1 deletion lib/vm/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! `wasmer::Module`.
use indexmap::IndexMap;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::fmt;
Expand Down
1 change: 0 additions & 1 deletion lib/vm/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use crate::trap::{Trap, TrapCode};
use crate::vmcontext::{VMCallerCheckedAnyfunc, VMTableDefinition};
use loupe::MemoryUsage;
use loupe_derive::MemoryUsage;
use serde::{Deserialize, Serialize};
use std::borrow::{Borrow, BorrowMut};
use std::cell::UnsafeCell;
Expand Down
2 changes: 1 addition & 1 deletion lib/vm/src/trap/trapcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use core::fmt::{self, Display, Formatter};
use core::str::FromStr;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;
use serde::{Deserialize, Serialize};
use thiserror::Error;

Expand Down
2 changes: 1 addition & 1 deletion lib/wasmer-types/src/initializers.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::indexes::{FunctionIndex, GlobalIndex, MemoryIndex, TableIndex};
use crate::lib::std::boxed::Box;
use loupe_derive::MemoryUsage;
use loupe::MemoryUsage;

#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
Expand Down

0 comments on commit 6eb646e

Please sign in to comment.