Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorim committed Mar 2, 2012
0 parents commit 15876aa
Show file tree
Hide file tree
Showing 7 changed files with 1,125 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Executable
quickstack

# Compiled Object files
*.slo
*.lo
*.o

# Compiled Dynamic libraries
*.so

# Compiled Static libraries
*.lai
*.la
*.a

# CMake-generated files
*.cmake
CMakeCache.txt
CMakeFiles/*
Makefile

*.tar.gz
_CPack_Package/*
install_manifest.txt
24 changes: 24 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
project(quickstack)
cmake_minimum_required(VERSION 2.6)
include(CPack)

set(SOURCE quickstack.cc)
set(BINUTILS_LIB_DIR /usr/binutils/lib /usr/binutils/lib64)

find_library(BINUTILS_LIB NAMES bfd
PATHS ${BINUTILS_LIB_DIR})
find_library(BINUTILS_ELF_LIB NAMES elf
PATHS ${BINUTILS_LIB_DIR})
find_library(BINUTILS_IBERTY_LIB NAMES iberty
PATHS ${BINUTILS_LIB_DIR})

find_path(BINUTILS_INCLUDE_DIR bfd.h
/usr/binutils/include)
include_directories(${BINUTILS_INCLUDE_DIR})

add_executable(quickstack ${SOURCE})
target_link_libraries(quickstack
${BINUTILS_LIB} ${BINUTILS_ELF_LIB} ${BINUTILS_IBERTY_LIB})

install(TARGETS quickstack DESTINATION bin)

21 changes: 21 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
quickstack is a tool to take call stack traces with minimal overheads.

There are a couple of tools to take stack traces such as gdb, pstack, but these tools
have serious overheads. In many cases, target process stops for 0.2-N seconds.
So it is dangerous to use such tools in production environment.
quickstack makes it possible to take stack traces in less than 1 milliseconds. This is
much smaller overhead so you can frequently take stack traces in production environment.

quickstack internally scans stack frames and guesses caller functions.
For 64bit applications, it is highly recommended to build with -fno-omit-frame-pointer.

How to build:
* Install binutils 2.22+
* Install cmake
* cmake .
* make
* make install

Example:
[user$] quickstack -p `pidof mysqld`

28 changes: 28 additions & 0 deletions licenses/COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
quickstack

Copyright (c) Yoshinori Matsunobu
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
Neither the name of the author nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
28 changes: 28 additions & 0 deletions licenses/COPYING.bulkdbg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
bulkdbg

Copyright (c) Akira Higuchi
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
Neither the name of the author nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 15876aa

Please sign in to comment.