Enhance wasm loading with LoadArgs and support module names (#3265)
- Add new API wasm_runtime_load_ex() in wasm_export.h and wasm_module_new_ex in wasm_c_api.h - Put aot_create_perf_map() into a separated file aot_perf_map.c - In perf.map, function names include user specified module name - Enhance the script to help flamegraph generations
This commit is contained in:
14
samples/linux-perf/cmake/FindWAMRC.cmake
Normal file
14
samples/linux-perf/cmake/FindWAMRC.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_file(WAMRC_BIN
|
||||
NAMES wamrc
|
||||
DOC "search wamrc"
|
||||
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/../../../wamr-compiler/build
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(WAMRC REQUIRED_VARS WAMRC_BIN)
|
||||
mark_as_advanced(WAMRC_BIN)
|
||||
23
samples/linux-perf/cmake/FindWASISDK.cmake
Normal file
23
samples/linux-perf/cmake/FindWASISDK.cmake
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
file(GLOB WASISDK_SEARCH_PATH "/opt/wasi-sdk-*")
|
||||
find_path(WASISDK_HOME
|
||||
NAMES share/wasi-sysroot
|
||||
PATHS ${WASISDK_SEARCH_PATH}
|
||||
NO_DEFAULT_PATH
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
string(REGEX MATCH [0-9]+\.[0-9]+\.*[0-9]* WASISDK_VERSION ${WASISDK_HOME})
|
||||
|
||||
find_package_handle_standard_args(WASISDK REQUIRED_VARS WASISDK_HOME VERSION_VAR WASISDK_VERSION)
|
||||
|
||||
if(WASISDK_FOUND)
|
||||
set(WASISDK_CC_COMMAND ${WASISDK_HOME}/bin/clang)
|
||||
set(WASISDK_CXX_COMMAND ${WASISDK_HOME}/bin/clang++)
|
||||
set(WASISDK_TOOLCHAIN ${WASISDK_HOME}/share/cmake/wasi-sdk.cmake)
|
||||
set(WASISDK_SYSROOT ${WASISDK_HOME}/share/wasi-sysroot)
|
||||
endif()
|
||||
Reference in New Issue
Block a user