kosslab-kr / linux-perf

:rocket: perf contribution (mirrored from git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git)
Other
16 stars 8 forks source link

[박성현] 개발환경 구성 문서 #191

Open ghost opened 7 years ago

ghost commented 7 years ago

Clone Linux Kernel

# git clone git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
# git fetch origin perf/core

또는

# git clone git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git -b perf/core

Prerequisutes

# sudo apt-get install -y libdw-dev libelf-dev libnewt-dev libunwind8-dev \
elfutils libaudit-dev libperl-dev libnuma-dev binutils-dev flex bison \
libpython2.7-dev asciidoc liblzma-dev libiberty-dev libgtk2.0-dev \
libssl-dev python-dev

How to Install

# cd tip/tools/perf
# make install

(root 권한으로 실행하지 않을 시 /usr가 아니라 /home 밑에 파일을 설치하게 되는 경우 발생)

Log Example

  BUILD:   Doing make 8 parallel build
  HOSTCC   fixdep.o
  HOSTLD   fixdep-in.o
  LINK     fixdep

Auto-detecting system features:
...                         dwarf: [ OK ]
...            dwarf_getlocations: [ OK ]
...                         glibc: [ OK ]
...                          gtk2: [ OK ]
...                      libaudit: [ OK ]
...                        libbfd: [ OK ]
...                        libelf: [ OK ]
...                       libnuma: [ OK ]
...        numa_num_possible_cpus: [ OK ]
...                       libperl: [ OK ]
...                     libpython: [ OK ]
...                      libslang: [ OK ]
...                     libcrypto: [ OK ]
...                     libunwind: [ OK ]
...            libdw-dwarf-unwind: [ OK ]
...                          zlib: [ OK ]
...                          lzma: [ OK ]
...                     get_cpuid: [ OK ]
...                           bpf: [ OK ]

  GEN      common-cmds.h
  CC       fd/array.o
  CC       cpu.o
  CC       fs/fs.o
  CC       exec-cmd.o
  CC       libbpf.o
  CC       event-parse.o
  CC       fs/tracing_path.o
  LD       fd/libapi-in.o
  CC       debug.o
  HOSTCC   pmu-events/json.o
  HOSTCC   pmu-events/jsmn.o
  CC       event-plugin.o
  LD       fs/libapi-in.o
  CC       str_error_r.o
  CC       help.o
  CC       pager.o
  LD       libapi-in.o
  HOSTCC   pmu-events/jevents.o
  CC       trace-seq.o
  AR       libapi.a
  CC       parse-options.o
  CC       jvmti/libjvmti.o
  CC       plugin_jbd2.o
  CC       plugin_hrtimer.o
  CC       bpf.o
  HOSTLD   pmu-events/jevents-in.o
  GEN      perf-archive
  GEN      perf-with-kcore
  LD       plugin_hrtimer-in.o
  LD       plugin_jbd2-in.o
  CC       ui/gtk/browser.o
  CC       plugin_kmem.o
  SUBDIR   Documentation
  LD       libbpf-in.o
  LINK     libbpf.a
  ASCIIDOC perf-stat.xml
  CC       ui/gtk/hists.o
  CC       ui/gtk/setup.o
  LD       plugin_kmem-in.o
  CC       plugin_kvm.o
  CC       jvmti/jvmti_agent.o
  LD       plugin_kvm-in.o
  CC       plugin_mac80211.o
  LD       plugin_mac80211-in.o
  CC       plugin_sched_switch.o
  CC       parse-filter.o
  LD       plugin_sched_switch-in.o
  LD       jvmti/jvmti-in.o
  CC       plugin_function.o
  CC       plugin_xen.o
  LD       plugin_xen-in.o
  LD       plugin_function-in.o
  CC       plugin_scsi.o
  CC       plugin_cfg80211.o
  CC       parse-utils.o
  CC       ui/gtk/util.o
  CC       run-command.o
  LD       plugin_cfg80211-in.o
  CC       ui/gtk/helpline.o
  CC       kbuffer-parse.o
  CC       sigchain.o
  LD       plugin_scsi-in.o
  LINK     plugin_jbd2.so
  LD       libtraceevent-in.o
  LINK     libtraceevent.a
  LINK     plugin_hrtimer.so
  LINK     plugin_kmem.so
  LINK     plugin_kvm.so
  LINK     plugin_mac80211.so
  LINK     plugin_sched_switch.so
  CC       util/annotate.o
  CC       subcmd-config.o
  CC       arch/common.o
  LINK     plugin_function.so
  LD       libsubcmd-in.o
  AR       libsubcmd.a
  LINK     plugin_xen.so
  LINK     plugin_scsi.so
  LINK     plugin_cfg80211.so
  CC       ui/setup.o
  CC       builtin-bench.o
  CC       ui/gtk/progress.o
  ASCIIDOC perf-record.xml
  ASCIIDOC perf-timechart.xml
  CC       arch/x86/util/header.o
  CC       ui/helpline.o
  CC       ui/progress.o
  CC       builtin-annotate.o
  CC       ui/util.o
  CC       arch/x86/util/tsc.o
  CC       arch/x86/util/pmu.o
  CC       ui/hist.o
  CC       arch/x86/util/kvm-stat.o
  CC       arch/x86/util/perf_regs.o
  CC       ui/gtk/annotate.o
  ASCIIDOC perf-report.xml
  CC       builtin-config.o
  CC       arch/x86/util/group.o
  ASCIIDOC perf-kmem.xml
  CC       arch/x86/util/dwarf-regs.o
  CC       arch/x86/util/unwind-libunwind.o
  CC       builtin-diff.o
  CC       arch/x86/util/auxtrace.o
  ASCIIDOC perf-c2c.xml
  CC       util/block-range.o
  CC       arch/x86/util/intel-pt.o
  LD       ui/gtk/gtk-in.o
  ASCIIDOC perf-buildid-list.xml
  LD       gtk-in.o
  LINK     pmu-events/jevents
  GEN      libtraceevent-dynamic-list
  CC       util/config.o
  CC       util/build-id.o
  ASCIIDOC perf-trace.xml
  CC       builtin-evlist.o
  CC       arch/x86/util/intel-bts.o
  LINK     libperf-jvmti.so
  CC       builtin-ftrace.o
  ASCIIDOC perf-data.xml
  CC       ui/stdio/hist.o
  CC       util/ctype.o
  CC       util/db-export.o
  CC       util/env.o
  CC       ui/browser.o
  LD       arch/x86/util/libperf-in.o
  CC       arch/x86/tests/regs_load.o
  CC       arch/x86/tests/dwarf-unwind.o
  CC       util/event.o
  ASCIIDOC perf-buildid-cache.xml
  CC       builtin-help.o
  ASCIIDOC perf-lock.xml
  CC       arch/x86/tests/arch-tests.o
  CC       arch/x86/tests/rdpmc.o
  CC       util/evlist.o
  CC       ui/browsers/annotate.o
  CC       arch/x86/tests/perf-time-to-tsc.o
  CC       builtin-sched.o
  CC       builtin-buildid-list.o
  CC       builtin-buildid-cache.o
  ASCIIDOC perf-help.xml
  CC       arch/x86/tests/insn-x86.o
  CC       builtin-kallsyms.o
  CC       builtin-list.o
  CC       builtin-record.o
  LD       arch/x86/tests/libperf-in.o
  LD       arch/x86/libperf-in.o
  LD       arch/libperf-in.o
  CC       ui/tui/setup.o
  ASCIIDOC perf-diff.xml
  CC       util/evsel.o
  CC       builtin-report.o
  CC       ui/tui/util.o
  CC       ui/browsers/hists.o
  CC       ui/tui/helpline.o
  CC       ui/tui/progress.o
  CC       util/evsel_fprintf.o
  CC       builtin-stat.o
  ASCIIDOC perf-archive.xml
  LD       ui/tui/libperf-in.o
  ASCIIDOC perf-script.xml
  CC       util/find_bit.o
  CC       builtin-timechart.o
  ASCIIDOC perf-probe.xml
  CC       util/kallsyms.o
  CC       util/levenshtein.o
  CC       util/llvm-utils.o
  CC       builtin-top.o
  ASCIIDOC perf-config.xml
  CC       util/memswap.o
  BISON    util/parse-events-bison.c
  CC       util/perf_regs.o
  ASCIIDOC perf-bench.xml
  CC       util/path.o
  CC       util/print_binary.o
  CC       util/rbtree.o
  CC       builtin-script.o
  CC       builtin-kmem.o
  CC       builtin-lock.o
  CC       builtin-kvm.o
  CC       util/libstring.o
  CC       util/bitmap.o
  CC       util/hweight.o
  CC       util/smt.o
  ASCIIDOC perf-evlist.xml
  CC       util/quote.o
  CC       builtin-inject.o
  ASCIIDOC perf-sched.xml
  CC       util/strbuf.o
  CC       builtin-mem.o
  ASCIIDOC perf-annotate.xml
  CC       util/string.o
  CC       ui/browsers/map.o
  CC       builtin-data.o
  CC       builtin-version.o
  CC       builtin-c2c.o
  CC       ui/browsers/scripts.o
  CC       builtin-trace.o
  CC       builtin-probe.o
  CC       util/strlist.o
  CC       util/strfilter.o
  CC       ui/browsers/header.o
  CC       bench/sched-messaging.o
  ASCIIDOC perf-kvm.xml
  LD       ui/browsers/libperf-in.o
  LD       ui/libperf-in.o
  CC       scripts/perl/Perf-Trace-Util/Context.o
  CC       util/top.o
  CC       bench/sched-pipe.o
  CC       tests/builtin-test.o
  CC       perf.o
  CC       bench/mem-functions.o
  CC       util/usage.o
  CC       util/dso.o
  LD       scripts/perl/Perf-Trace-Util/libperf-in.o
  CC       scripts/python/Perf-Trace-Util/Context.o
  ASCIIDOC perf-top.xml
  CC       tests/parse-events.o
  CC       bench/futex-hash.o
  CC       util/symbol.o
  LD       scripts/python/Perf-Trace-Util/libperf-in.o
  LD       scripts/libperf-in.o
  CC       bench/futex-wake.o
  CC       trace/beauty/clone.o
  CC       trace/beauty/fcntl.o
  CC       bench/futex-wake-parallel.o
  CC       trace/beauty/ioctl.o
  CC       trace/beauty/pkey_alloc.o
  CC       trace/beauty/statx.o
  CC       bench/futex-requeue.o
  CC       bench/futex-lock-pi.o
  LD       trace/beauty/libperf-in.o
  CC       tests/dso-data.o
  CC       bench/mem-memcpy-x86-64-asm.o
  CC       util/symbol_fprintf.o
  CC       bench/mem-memset-x86-64-asm.o
  CC       bench/numa.o
  CC       tests/attr.o
  CC       util/color.o
  ASCIIDOC perf-ftrace.xml
  ASCIIDOC perf-script-perl.xml
  CC       util/metricgroup.o
  CC       tests/vmlinux-kallsyms.o
  CC       util/header.o
  CC       tests/openat-syscall.o
  CC       util/callchain.o
  CC       tests/openat-syscall-all-cpus.o
  CC       tests/openat-syscall-tp-fields.o
  ASCIIDOC perf-list.xml
  CC       util/values.o
  CC       tests/mmap-basic.o
  ASCIIDOC perf-script-python.xml
  CC       tests/perf-record.o
  LD       bench/perf-in.o
  ASCIIDOC perf-test.xml
  CC       util/debug.o
  CC       tests/evsel-roundtrip-name.o
  CC       tests/evsel-tp-sched.o
  CC       util/machine.o
  CC       tests/fdarray.o
  CC       tests/pmu.o
  ASCIIDOC perf-mem.xml
  ASCIIDOC perf-inject.xml
  CC       tests/hists_common.o
  CC       tests/hists_link.o
  ASCIIDOC perf-kallsyms.xml
  CC       tests/hists_filter.o
  ASCIIDOC perf.xml
  CC       tests/hists_output.o
  XMLTO    perf-stat.1
  CC       tests/hists_cumulate.o
  GEN      python/perf.so
  XMLTO    perf-record.1
  CC       util/map.o
  CC       tests/python-use.o
  CC       tests/bp_signal.o
  CC       tests/bp_signal_overflow.o
  CC       tests/task-exit.o
  CC       util/pstack.o
  CC       tests/sw-clock.o
  INSTALL  trace_plugins
  GEN      pmu-events/pmu-events.c
  CC       tests/mmap-thread-lookup.o
  CC       tests/thread-mg-share.o
  XMLTO    perf-timechart.1
  CC       pmu-events/pmu-events.o
  CC       util/session.o
  CC       util/syscalltbl.o
  CC       tests/switch-tracking.o
  CC       tests/keep-tracking.o
  CC       util/ordered-events.o
  XMLTO    perf-report.1
  CC       util/namespaces.o
  LD       pmu-events/pmu-events-in.o
  CC       util/comm.o
  CC       tests/code-reading.o
  CC       tests/sample-parsing.o
  CC       util/thread.o
  XMLTO    perf-kmem.1
  XMLTO    perf-c2c.1
  CC       tests/parse-no-sample-id-all.o
  CC       util/thread_map.o
  CC       tests/kmod-path.o
  CC       tests/thread-map.o
  CC       util/trace-event-parse.o
  CC       tests/llvm.o
  CC       util/parse-events-bison.o
  CC       tests/llvm-src-base.o
  XMLTO    perf-buildid-list.1
  CC       tests/llvm-src-kbuild.o
  BISON    util/pmu-bison.c
  XMLTO    perf-trace.1
  CC       util/trace-event-read.o
  CC       tests/llvm-src-prologue.o
  CC       tests/llvm-src-relocation.o
  CC       tests/bpf.o
  CC       tests/topology.o
  CC       util/trace-event-info.o
  CC       tests/mem.o
  CC       tests/cpumap.o
  CC       tests/stat.o
  CC       tests/event_update.o
  CC       tests/event-times.o
  CC       tests/expr.o
  CC       util/trace-event-scripting.o
  CC       util/trace-event.o
  XMLTO    perf-data.1
  CC       util/svghelper.o
  CC       util/sort.o
  XMLTO    perf-buildid-cache.1
  CC       tests/backward-ring-buffer.o
  CC       tests/sdt.o
  CC       util/hist.o
  CC       tests/is_printable_array.o
  CC       tests/bitmap.o
  CC       tests/perf-hooks.o
  CC       tests/clang.o
  CC       tests/unit_number__scnprintf.o
  CC       tests/dwarf-unwind.o
  CC       util/util.o
  XMLTO    perf-lock.1
  XMLTO    perf-help.1
  LD       tests/perf-in.o
  XMLTO    perf-diff.1
  LD       perf-in.o
  CC       util/xyarray.o
  CC       util/cpumap.o
  XMLTO    perf-archive.1
  XMLTO    perf-script.1
  XMLTO    perf-probe.1
  CC       util/cgroup.o
  CC       util/target.o
  CC       util/rblist.o
  XMLTO    perf-config.1
  CC       util/intlist.o
  CC       util/vdso.o
  CC       util/counts.o
  CC       util/stat.o
  XMLTO    perf-bench.1
  CC       util/stat-shadow.o
  CC       util/record.o
  CC       util/srcline.o
  XMLTO    perf-evlist.1
  CC       util/data.o
  CC       util/tsc.o
  CC       util/cloexec.o
  XMLTO    perf-sched.1
  XMLTO    perf-annotate.1
  CC       util/call-path.o
  CC       util/rwsem.o
  CC       util/thread-stack.o
  CC       util/auxtrace.o
  CC       util/intel-pt-decoder/intel-pt-pkt-decoder.o
  CC       util/scripting-engines/trace-event-perl.o
  GEN      util/intel-pt-decoder/inat-tables.c
  CC       util/intel-pt-decoder/intel-pt-log.o
  CC       util/intel-pt.o
  XMLTO    perf-kvm.1
  CC       util/intel-pt-decoder/intel-pt-decoder.o
  XMLTO    perf-top.1
  XMLTO    perf-ftrace.1
  CC       util/intel-bts.o
  CC       util/scripting-engines/trace-event-python.o
  CC       util/parse-branch-options.o
  CC       util/dump-insn.o
  CC       util/parse-regs-options.o
  CC       util/term.o
  XMLTO    perf-script-perl.1
  CC       util/help-unknown-cmd.o
  CC       util/mem-events.o
  CC       util/vsprintf.o
  XMLTO    perf-list.1
  CC       util/intel-pt-decoder/intel-pt-insn-decoder.o
  CC       util/drv_configs.o
  LD       util/scripting-engines/libperf-in.o
  CC       util/units.o
  XMLTO    perf-script-python.1
  CC       util/time-utils.o
  BISON    util/expr-bison.c
  CC       util/branch.o
  CC       util/bpf-loader.o
  CC       util/bpf-prologue.o
  CC       util/symbol-elf.o
  CC       util/probe-file.o
  CC       util/probe-event.o
  XMLTO    perf-test.1
  LD       util/intel-pt-decoder/libperf-in.o
  CC       util/probe-finder.o
  XMLTO    perf-mem.1
  XMLTO    perf-inject.1
  XMLTO    perf-kallsyms.1
  XMLTO    perf.1
  CC       util/dwarf-aux.o
  CC       util/dwarf-regs.o
  CC       util/unwind-libunwind-local.o
  CC       util/unwind-libunwind.o
  CC       util/zlib.o
  CC       util/lzma.o
  CC       util/demangle-java.o
  CC       util/demangle-rust.o
  CC       util/jitdump.o
  CC       util/genelf.o
  CC       util/genelf_debug.o
  INSTALL  Documentation-man
  CC       util/perf-hooks.o
  FLEX     util/parse-events-flex.c
  FLEX     util/pmu-flex.c
  CC       util/pmu-bison.o
  CC       util/expr-bison.o
  CC       util/parse-events.o
  CC       util/parse-events-flex.o
  CC       util/pmu.o
  CC       util/pmu-flex.o
  LD       util/libperf-in.o
  LD       libperf-in.o
  AR       libperf.a
  LINK     perf
  LINK     libperf-gtk.so
  INSTALL  GTK UI
  INSTALL  binaries
  INSTALL  tests
  INSTALL  libperf-jvmti.so
  INSTALL  libexec
  INSTALL  perf-archive
  INSTALL  perf-with-kcore
  INSTALL  strace/groups
  INSTALL  perl-scripts
  INSTALL  python-scripts
  INSTALL  perf_completion-script
  INSTALL  perf-tip