-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RUNTIME] Add libbacktrace for backtraces with line numbers
- Changed build settings to give absolute paths in debug symbols - Add new TVM error types for internal errors - Move CHECK and LOG(FATAL) to tvm/runtime/logging.h
- Loading branch information
Showing
102 changed files
with
801 additions
and
337 deletions.
There are no files selected for viewing
Submodule dmlc-core
updated
19 files
+4 −3 | .github/workflows/githubci.yml | |
+6 −1 | CMakeLists.txt | |
+1 −5 | Makefile | |
+1 −1 | README.md | |
+0 −5 | appveyor.yml | |
+1 −1 | doc/Doxyfile | |
+2 −2 | doc/parameter.md | |
+25 −4 | include/dmlc/base.h | |
+56 −50 | include/dmlc/logging.h | |
+1 −0 | include/dmlc/omp.h | |
+5 −33 | include/dmlc/parameter.h | |
+0 −3 | make/config.mk | |
+14 −15 | scripts/s390x/Dockerfile | |
+2 −2 | scripts/test_script.sh | |
+17 −6 | src/io/hdfs_filesys.cc | |
+41 −2 | test/unittest/unittest_logging.cc | |
+0 −11 | test/unittest/unittest_logging_throw.cc | |
+4 −11 | test/unittest/unittest_param.cc | |
+6 −8 | test/unittest/unittest_thread_group.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
include(ExternalProject) | ||
|
||
# Git tag for libbacktrace | ||
set(TAG dedbe13fda00253fe5d4f2fb812c909729ed5937) | ||
|
||
ExternalProject_Add(project_libbacktrace | ||
PREFIX libbacktrace | ||
GIT_REPOSITORY https://github.com/ianlancetaylor/libbacktrace.git | ||
GIT_TAG ${TAG} | ||
CONFIGURE_COMMAND "${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/src/project_libbacktrace/configure" | ||
"--prefix=${CMAKE_CURRENT_BINARY_DIR}/libbacktrace" | ||
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/libbacktrace" | ||
BUILD_COMMAND make | ||
INSTALL_COMMAND make install | ||
BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/lib/libbacktrace.a" | ||
"${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/include/backtrace.h" | ||
# disable the builtin update because it rebuilds on every build | ||
UPDATE_DISCONNECTED ON | ||
UPDATE_COMMAND "" | ||
# libbacktrace has a bug on macOS with shared libraries. | ||
PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/libbacktrace_macos.patch | ||
) | ||
|
||
# Only rebuild libbacktrace if this file changes | ||
ExternalProject_Add_Step(project_libbacktrace update-new | ||
DEPENDERS configure | ||
DEPENDS "${CMAKE_CURRENT_LIST_DIR}/Libbacktrace.cmake" | ||
COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/src/project_libbacktrace; git checkout -f ${TAG} | ||
) | ||
|
||
add_library(libbacktrace STATIC IMPORTED) | ||
add_dependencies(libbacktrace project_libbacktrace) | ||
set_property(TARGET libbacktrace | ||
PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/lib/libbacktrace.a) | ||
# create include directory so cmake doesn't complain | ||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/include) | ||
target_include_directories(libbacktrace | ||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/include>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/macho.c b/macho.c | ||
index 66e101e..d00aea9 100644 | ||
--- a/macho.c | ||
+++ b/macho.c | ||
@@ -1268,7 +1268,7 @@ backtrace_initialize (struct backtrace_state *state, const char *filename, | ||
mff = macho_nodebug; | ||
if (!macho_add (state, name, d, 0, NULL, base_address, 0, | ||
error_callback, data, &mff, &mfs)) | ||
- return 0; | ||
+ continue; | ||
|
||
if (mff != macho_nodebug) | ||
macho_fileline_fn = mff; |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.