First step to be a contributor of perf - sihyeonn/linux-perf GitHub Wiki

Welcome to the linux-perf wiki!

Environment

  • OS : Linux mint 18.2 sonya Mate
  • Kernel : 4.10.0-37-generic

Process to contribute

Set Perf

  1. Make your own repository in here to your account, and then make your own repository. e.g.
$ git clone https://github.com/sihyeonn/linux-perf.git
  1. Add remote repository.
$ cd linux-perf
$ git remote add acme git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git
  1. Get the kernel sources and install perf.
$ git fetch acme perf/core
$ cd tools/perf
$ 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
$ sudo make 
$ sudo make install

Or if you want to trace perf with uftrace, you can use '-pg' options.

$ git fetch acme perf/core
$ cd tools/perf
$ 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
$ sudo make EXTRA_CFLAGS='-pg'
$ sudo make install EXTRA_CFLAGS='-pg'

Set Git email

  1. Install git-email
$ sudo apt-get install git-email
  1. Set your informations. e.g.
$ git config --global user.name "Sihyeon Jang"
$ git config --global user.email [email protected]
$ git config --global sendemail.smtpserver smtp.gmail.com
$ git config --global sendemail.smtpserverport 587
$ git config --global sendemail.smtpuser [email protected]
$ git config --global sendemail.smtpencryption tls
  1. Change your account access for git-email in here.

Do your work!

When you work for contribution, you'd better use git tools. $ git show, $ git log, $ git blame, $ git diff, etc.

Send patch files

  1. git add something you want to commit.

  2. git commit with message. e.g.

$ git commit -m "perf top: Document missing options
>
>Cc: Jiri Olsa <[email protected]>
>Cc: Namhyung Kim <[email protected]>
>Signed-off-by: Sihyeon Jang <[email protected]>"
  1. Make a patch file.
$ git format-patch -1
  1. Send a patch email. e.g.
$ git send-email --to "Arnaldo Carvalho de Melo <[email protected]>" \
--cc "[email protected]" \
--cc "Jiri Olsa <[email protected]>" \
--cc "Namhyung Kim <[email protected]>" \
<filename of patch>.patch