02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
29 Jul, 2017
1 commit
-
This adds documentation on the environment variables needed to the
message telling that no conversion support is compiled in.Committer testing:
$ make -C tools/perf install
$ perf data convert --all --to-ctf myctftrace
No conversion support compiled in. perf should be compiled with environment variables LIBBABELTRACE=1 and LIBBABELTRACE_DIR=/path/to/libbabeltrace/
$Signed-off-by: Geneviève Bastien
Acked-by: Jiri Olsa
Tested-by: Arnaldo Carvalho de Melo
Cc: Alexander Shishkin
Cc: Francis Deslauriers
Cc: Julien Desfossez
Cc: Mathieu Desnoyers
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/20170727181205.24843-3-gbastien@versatic.net
Signed-off-by: Arnaldo Carvalho de Melo
27 Mar, 2017
1 commit
-
We got it from the git sources but never used it for anything, with the
place where this would be somehow used remaining:static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
{
prefix = NULL;
if (p->option & RUN_SETUP)
prefix = NULL; /* setup_perf_directory(); */Ditch it.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-uw5swz05vol0qpr32c5lpvus@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
28 Jun, 2016
3 commits
-
After this patch, 'perf data convert' convert comm events to output CTF
stream.Result:
# perf record -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.378 MB perf.data (73 samples) ]# perf data convert --to-ctf ./out.ctf
[ perf data convert: Converted 'perf.data' into CTF data './out.ctf' ]
[ perf data convert: Converted and wrote 0.003 MB (73 samples) ]# babeltrace --clock-seconds ./out.ctf/
[10627.402515791] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 }
[10627.402518972] (+0.000003181) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 }
... // only sample event is converted# perf data convert --all --to-ctf ./out.ctf
[ perf data convert: Converted 'perf.data' into CTF data './out.ctf' ]
[ perf data convert: Converted and wrote 0.023 MB (73 samples, 384 non-samples) ]# babeltrace --clock-seconds ./out.ctf/
[ 0.000000000] (+?.?????????) perf_comm: { cpu_id = 0 }, { pid = 1, tid = 1, comm = "init" }
[ 0.000000000] (+0.000000000) perf_comm: { cpu_id = 0 }, { pid = 2, tid = 2, comm = "kthreadd" }
[ 0.000000000] (+0.000000000) perf_comm: { cpu_id = 0 }, { pid = 3, tid = 3, comm = "ksoftirqd/0" }
... // comm events are converted
[10627.402515791] (+10627.402515791) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 }
[10627.402518972] (+0.000003181) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 }
... // samples are also convertedSigned-off-by: Wang Nan
Acked-by: Jiri Olsa
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1466767332-114472-7-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo -
If 'all' option is selected, 'perf data convert' should convert not only
samples, but non-sample events such as comm and fork. Add this option in
perf_data_convert_opts. Following commits will add cmdline option to
select it.Signed-off-by: Wang Nan
Acked-by: Jiri Olsa
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1466767332-114472-4-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo -
Following commits will add new option to 'perf data convert'. All options
should be grouped into a structure and passed to low level converter
(currently there's only one converter).Introduce data-convert.h and define 'struct perf_data_convert_opts' in
it. Pass 'force' through opts.Signed-off-by: Wang Nan
Acked-by: Jiri Olsa
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1466767332-114472-3-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo
18 Dec, 2015
1 commit
-
Move the subcommand-related files from perf to a new library named
libsubcmd.a.Since we're moving files anyway, go ahead and rename 'exec_cmd.*' to
'exec-cmd.*' to be consistent with the naming of all the other files.Signed-off-by: Josh Poimboeuf
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/c0a838d4c878ab17fee50998811612b2281355c1.1450193761.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo
03 Apr, 2015
1 commit
-
Enable perf data convert to use perf.data when it is not owned by
current user or root.Example:
# perf record ls
# chown Yunlong.Song:Yunlong.Song perf.data
# ls -al perf.data
-rw------- 1 Yunlong.Song Yunlong.Song 28260 Apr 2 17:35 perf.data
# id
uid=0(root) gid=0(root) groups=0(root),64(pkcs11)Before this patch:
# perf data convert --to-ctf=./ctf-data/
File perf.data not owned by current user or root (use -f to override)
# perf data convert --to-ctf=./ctf-data/ -f
Error: unknown switch `f'usage: perf data convert []
-v, --verbose be more verbose
-i, --input input file name
--to-ctf ... Convert to CTF formatAfter this patch:
# perf data convert --to-ctf=./ctf-data/
File perf.data not owned by current user or root (use -f to override)
# perf data convert --to-ctf=./ctf-data/ -f
# ls ctf-data/
metadata perf_stream_0As shown above, the -f option really works now.
Signed-off-by: Yunlong Song
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1427982439-27388-11-git-send-email-yunlong.song@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo
20 Mar, 2015
1 commit
-
The bash completion does not support listing subsubcommands for 'perf
data ', so fix it.Example:
Before this patch:
$ perf data
$As shown above, the subsubcommands of perf data does not come out.
After this patch:
$ perf data
convertAs shown above, the subsubcommands of perf data can come out now.
Signed-off-by: Yunlong Song
Tested-by: Arnaldo Carvalho de Melo
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1426685758-25488-8-git-send-email-yunlong.song@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo
27 Feb, 2015
1 commit
-
The recent new patch "perf tools: Add new 'perf data' command" (commit
2245bf14 in acme's git repo perf/core) has caused a building error when
compiling the source code of perf:cc1: warnings being treated as errors
builtin-data.c:89: error: missing initializer
builtin-data.c:89: error: (near initialization for ‘data_cmds[1].summary’)
make[2]: *** [builtin-data.o] Error 1
make[2]: *** Waiting for unfinished jobs....
LD bench/perf-in.o
LD tests/perf-in.o
make[1]: *** [perf-in.o] Error 2
make: *** [all] Error 2This patch fixes the building error above.
Signed-off-by: Yunlong Song
Cc: Peter Zijlstra
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1425038026-27604-1-git-send-email-yunlong.song@huawei.com
[ .name == NULL ends the loop, use it instead of seting all fields to NULL ]
Signed-off-by: Arnaldo Carvalho de Melo
26 Feb, 2015
1 commit
-
Adding 'perf data convert' to convert perf data file into different
format. This patch adds support for CTF format conversion.To convert perf.data into CTF run:
$ perf data convert --to-ctf=./ctf-data/
[ perf data convert: Converted 'perf.data' into CTF data './ctf-data/' ]
[ perf data convert: Converted and wrote 11.268 MB (100230 samples) ]The command will create CTF metadata out of perf.data file (or one
specified via -i option) and then convert all sample events into single
CTF stream.Each sample_type bit is translated into separated CTF event field apart
from following exceptions:PERF_SAMPLE_RAW - added in next patch
PERF_SAMPLE_READ - TODO
PERF_SAMPLE_CALLCHAIN - TODO
PERF_SAMPLE_BRANCH_STACK - TODO
PERF_SAMPLE_REGS_USER - TODO
PERF_SAMPLE_STACK_USER - TODO$ perf --debug=data-convert=2 data convert ...
The converted CTF data could be analyzed by CTF tools, like babletrace
or tracecompass [1].$ babeltrace ./ctf-data/
[03:19:13.962125533] (+?.?????????) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 1 }
[03:19:13.962130001] (+0.000004468) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 1 }
[03:19:13.962131936] (+0.000001935) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 8 }
[03:19:13.962133732] (+0.000001796) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 114 }
[03:19:13.962135557] (+0.000001825) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 2087 }
[03:19:13.962137627] (+0.000002070) cycles: { }, { ip = 0xFFFFFFFF81361938, tid = 20714, pid = 20714, period = 37582 }
[03:19:13.962161091] (+0.000023464) cycles: { }, { ip = 0xFFFFFFFF8124218F, tid = 20714, pid = 20714, period = 600246 }
[03:19:13.962517569] (+0.000356478) cycles: { }, { ip = 0xFFFFFFFF811A75DB, tid = 20714, pid = 20714, period = 1325731 }
[03:19:13.969518008] (+0.007000439) cycles: { }, { ip = 0x34080917B2, tid = 20714, pid = 20714, period = 1144298 }The following members to the ctf-environment were decided to be added to
distinguish and specify perf CTF data:- domain
It says "kernel" because it contains a kernel trace (not to be
confused with a user space like lttng-ust does)- tracer_name
It says perf. This can be used to distinguish between lttng and perf
CTF based trace.- version
The kernel version from stream. In addition to release, this is what
it looks like on a Debian kernel:release = "3.14-1-amd64";
version = "3.14.0";[1] http://projects.eclipse.org/projects/tools.tracecompass
Signed-off-by: Jiri Olsa
Acked-by: Namhyung Kim
Reviewed-by: David Ahern
Tested-by: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker
Cc: Jeremie Galarneau
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Sebastian Andrzej Siewior
Cc: Tom Zanussi
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1424470628-5969-4-git-send-email-jolsa@kernel.org
Signed-off-by: Sebastian Andrzej Siewior
Signed-off-by: Arnaldo Carvalho de Melo
25 Feb, 2015
1 commit
-
Adding new 'perf data' command to provide operations over data files.
The 'perf data convert' sub command is coming in following patch, but
there's possibility for other useful commands like 'perf data ls' (to
display perf data file in directory in ls style).Signed-off-by: Jiri Olsa
Acked-by: Namhyung Kim
Reviewed-by: David Ahern
Cc: Frederic Weisbecker
Cc: Jeremie Galarneau
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Sebastian Andrzej Siewior
Cc: Tom Zanussi
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1424470628-5969-3-git-send-email-jolsa@kernel.org
Signed-off-by: Sebastian Andrzej Siewior
Signed-off-by: Arnaldo Carvalho de Melo