Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #298 from May2016/master
Browse files Browse the repository at this point in the history
fix build.sh and change 'tatistics->memory_rss_in_bytes' from '= val'…
  • Loading branch information
imotai committed Jan 13, 2016
2 parents dedb5d4 + 0f70cb5 commit c29f386
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,19 @@ else

# tera
git clone https://github.com/baidu/tera
depends_file=depends.mk.template
cd tera
sed -i 's#^SOFA_PBRPC_PREFIX=.*#SOFA_PBRPC_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -i 's#^PROTOBUF_PREFIX=.*#PROTOBUF_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -i 's#^SNAPPY_PREFIX=.*#SNAPPY_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -i 's#^ZOOKEEPER_PREFIX=.*#ZOOKEEPER_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -i 's#^GFLAGS_PREFIX=.*#GFLAGS_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -i 's#^GLOG_PREFIX=.*#GLOG_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -i 's#^GTEST_PREFIX=.*#GTEST_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -i 's#^GPERFTOOLS_PREFIX=.*#GPERFTOOLS_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -i 's#^BOOST_INCDIR=.*#BOOST_INCDIR='${DEPS_PREFIX}'\/boost_1_57_0#' depends.mk
sed -i 's#^INS_PREFIX=.*#INS_PREFIX='${DEPS_PREFIX}'#' depends.mk
sed -e '$ c -lgtest_main -lgtest -lglog -lgflags -ltcmalloc_minimal -lunwind' depends.mk > depends.mk.new
sed -i 's#^SOFA_PBRPC_PREFIX=.*#SOFA_PBRPC_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -i 's#^PROTOBUF_PREFIX=.*#PROTOBUF_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -i 's#^SNAPPY_PREFIX=.*#SNAPPY_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -i 's#^ZOOKEEPER_PREFIX=.*#ZOOKEEPER_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -i 's#^GFLAGS_PREFIX=.*#GFLAGS_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -i 's#^GLOG_PREFIX=.*#GLOG_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -i 's#^GTEST_PREFIX=.*#GTEST_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -i 's#^GPERFTOOLS_PREFIX=.*#GPERFTOOLS_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -i 's#^BOOST_INCDIR=.*#BOOST_INCDIR='${DEPS_PREFIX}'\/boost_1_57_0#' ${depends_file}
sed -i 's#^INS_PREFIX=.*#INS_PREFIX='${DEPS_PREFIX}'#' ${depends_file}
sed -e '$ c -lgtest_main -lgtest -lglog -lgflags -ltcmalloc_minimal -lunwind' ${depends_file} > depends.mk.new
mv depends.mk.new depends.mk
make -j8 >/dev/null
cp -a build/lib/*.a ${DEPS_PREFIX}/lib
Expand Down
2 changes: 1 addition & 1 deletion src/agent/resource_collector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ bool GetCgroupMemoryUsage(const std::string& group_path,

if (name == "rss") {
mem_count++;
statistics->memory_rss_in_bytes = val;
statistics->memory_rss_in_bytes += val;
} else if (name == "cache") {
mem_count++;
statistics->memory_rss_in_bytes += val;
Expand Down

0 comments on commit c29f386

Please sign in to comment.