blob: b445c8eb1e8bee834492b389d0f779a091d94bbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
---
- name: Install perf
apt:
name:
- linux-tools-common
- "linux-tools-{{ ansible_kernel }}"
- "linux-headers-{{ ansible_kernel }}"
state: present
- name: Install bcc dependencies
apt:
name:
- bison
- build-essential
- cmake
- clang
- flex
- git
- libedit-dev
- libllvm14
- llvm-14-dev
- libclang-14-dev
- python3
- zlib1g-dev
- libelf-dev
- libfl-dev
- python3-distutils
state: present
- name: Clone bcc
git:
repo: https://github.com/iovisor/bcc.git
dest: /src/bcc
version: "{{ bcc_revision }}"
become_user: git
# Required to build libbpf-tools
- name: Symlink /usr/include/asm-generic to asm
file:
src: /usr/include/asm-generic
dest: /usr/include/asm
state: link
# Required to build libbpf-tools
- name: Symlink /usr/bin/llvm-strip-14 to llvm-strip
file:
src: /usr/bin/llvm-strip-14
dest: /usr/bin/llvm-strip
state: link
- name: Make libbpf-tools
make:
jobs: "{{ ansible_processor_nproc }}"
chdir: /src/bcc/libbpf-tools
become_user: git
- name: Install libbpf-tools
make:
target: install
jobs: "{{ ansible_processor_nproc }}"
chdir: /src/bcc/libbpf-tools
- name: Clone Flamegraph
git:
repo: https://github.com/brendangregg/flamegraph.git
dest: /src/flamegraph
become_user: git
- name: Install stackcollapse-perf.pl as stackcollapse
copy:
src: /src/flamegraph/stackcollapse-perf.pl
dest: /usr/local/bin/stackcollapse
mode: 0755
remote_src: true
- name: Install flamegraph.pl as flamegraph
copy:
src: /src/flamegraph/flamegraph.pl
dest: /usr/local/bin/flamegraph
mode: 0755
remote_src: true
- name: Install profile-gitaly.sh as profile-gitaly
copy:
src: profile-gitaly.sh
dest: /usr/local/bin/profile-gitaly
owner: root
group: root
mode: '0755'
|