Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 5e4b7cbebfec001c27bbc3c96786441437bd4c5c
- Author: bartus <szczepaniak.bartek+github@gmail.com>
- Date: Fri Mar 15 17:17:48 2019 +0100
- fix new version
- 1. fix missing submodule init
- 2. fix perf_record_sample enum scope
- 3. use system protoc (protobuff)
- diff --git a/PKGBUILD b/PKGBUILD
- index 3bfb64c..162e6c6 100644
- --- a/PKGBUILD
- +++ b/PKGBUILD
- @@ -2,34 +2,59 @@
- _pkgname=autofdo
- pkgname=$_pkgname-git
- -pkgver=v0.1.r63.cf651b8
- +pkgver=v0.1.r88.492384d
- pkgrel=1
- pkgdesc="a tool to convert perf.data profile to AutoFDO profile that can be used by GCC and LLVM"
- arch=('x86_64')
- url="https://github.com/google/autofdo"
- license=('Apache')
- depends=()
- -makedepends=('git' 'llvm')
- +makedepends=('git' 'llvm' 'protobuf') #use system protoc instad of building one
- optdepends=('llvm: for LLVM support')
- +options=('!makeflags')
- provides=("${_pkgname}")
- conflicts=("${_pkgname}")
- -source=("$_pkgname::git+$url")
- -md5sums=('SKIP')
- +source=("$_pkgname::git+$url"
- + "git+https://github.com/google/perf_data_converter.git"
- + "git+https://github.com/protocolbuffers/protobuf.git"
- + "perf_record_sample.patch")
- +md5sums=('SKIP'
- + 'SKIP'
- + 'SKIP'
- + '21be9ec59b57bb740c3c5af777f67558')
- pkgver() {
- cd "$srcdir/${_pkgname}"
- printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
- }
- +prepare() {
- + cd ${srcdir}/${_pkgname}
- +# initialize submodules
- + git config submodule.third_party/perf_data_converter.url ${srcdir}/perf_data_converter
- + git config submodule.third_party/protobuf.url ${srcdir}/protobuf
- + git submodule update --init --recursive --remote
- +# apply patches
- + git apply -v ${srcdir}/perf_record_sample.patch
- +# initialize autoconf build system
- + aclocal -I .
- + autoheader
- + autoconf
- + automake --add-missing -c
- +}
- +
- build() {
- cd "$srcdir/${_pkgname}"
- +# configure build
- ./configure \
- --prefix=/usr \
- - --with-llvm=/usr/lib
- + --with-llvm=$(which llvm-config)
- +# build
- make
- }
- package() {
- cd "$srcdir/${_pkgname}"
- +# install
- make DESTDIR="$pkgdir/" install
- }
- diff --git a/perf_record_sample.patch b/perf_record_sample.patch
- new file mode 100644
- index 0000000..06036ce
- --- /dev/null
- +++ b/perf_record_sample.patch
- @@ -0,0 +1,13 @@
- +diff --git a/sample_reader.cc b/sample_reader.cc
- +index 3071582..4b27185 100644
- +--- a/sample_reader.cc
- ++++ b/sample_reader.cc
- +@@ -212,7 +212,7 @@ bool PerfDataSampleReader::Append(const string &profile_file) {
- + // focus_binary_re_ is used to match the binary name with the samples.
- + for (const auto &event : parser.parsed_events()) {
- + if (!event.event_ptr ||
- +- event.event_ptr->header().type() != PERF_RECORD_SAMPLE) {
- ++ event.event_ptr->header().type() != quipper::PERF_RECORD_SAMPLE) {
- + continue;
- + }
- + if (MatchBinary(event.dso_and_offset.dso_name(), focus_binary)) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement