Skip to content

Commit

Permalink
Merge pull request #46 from yanqi27/tcmalloc-integration
Browse files Browse the repository at this point in the history
Tcmalloc integration

Former-commit-id: ac17e46 [formerly 3c4aabb]
Former-commit-id: 28db229
  • Loading branch information
Celthi authored May 30, 2022
2 parents 8147fa0 + 8455bb7 commit e222b14
Show file tree
Hide file tree
Showing 13 changed files with 138 additions and 5,282 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt install -y wget \
&& apt install -y python-dev \
&& apt install -y python3-dev \
&& apt install -y libgoogle-perftools-dev \
&& apt install -y dh-autoreconf \
51 changes: 51 additions & 0 deletions build_tcmalloc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

# =============================================================================
# FILENAME : build_tcmalloc.sh
# AUTHOR : Michael Yan
# CREATION : 2022-05-30
# Script to build gperftools/libtcmalloc with specified version.
#
# This script will the do the following steps
# 1. Create working directory
# 2. clone the tcmalloc source
# 3. checkout the desired release version
# 4. configure, build and install
# =============================================================================
set -e

if [ "$#" -ne 1 ]
then
echo "Usage: $0 <gperftools version>"
echo " For example, \"$0 2.7\""
echo " Please refer to https://github.com/gperftools/gperftools/releases"
exit 1
fi

PROJECT_FOLDER=$(pwd)
release_tag=$1
echo "Current project folder is $PROJECT_FOLDER"
build_folder=$PROJECT_FOLDER/build
mkdir -p $build_folder
cd $build_folder
scr_dir="gperftools"
if [ ! -d $scr_dir ]
then
echo "cloning gperftools ..."
git clone https://github.com/gperftools/gperftools.git
fi
cd $scr_dir

echo "checkout $release_tag"
branch_name=gperftools-$release_tag
if [ -n "$(git branch --list ${branch_name})" ]
then
echo "Branch name $branch_name already exists."
else
git checkout tags/$branch_name -b $branch_name
fi

echo "building..."
./autogen.sh
./configure
make clean && make -j 4 && sudo make install
1 change: 1 addition & 0 deletions gdbplus/gdb-12.1/gdb/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,7 @@ COMMON_SFILES = \
heap_ptmalloc_2_27.c \
heap_ptmalloc_2_31.c \
heap_ptmalloc_2_35.c \
heap_tcmalloc.c \
heapcmd.c \
i386-decode.c \
inf-child.c \
Expand Down
Loading

0 comments on commit e222b14

Please sign in to comment.