License cleanup: add SPDX GPL-2.0 license identifier to files with no license
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 <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 15:07:57 +01:00
|
|
|
|
2014-04-30 15:25:10 +02:00
|
|
|
|
2017-04-17 11:39:06 -03:00
|
|
|
|
2019-06-26 12:45:09 -03:00
|
|
|
|
2019-07-04 11:32:27 -03:00
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
2017-04-19 20:57:47 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-18 10:46:11 -03:00
|
|
|
|
2017-09-11 10:50:26 -03:00
|
|
|
|
2019-08-30 14:45:20 -03:00
|
|
|
|
2020-10-20 15:57:21 -03:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
|
|
|
|
|
2021-10-11 01:20:30 -07:00
|
|
|
|
2020-10-20 15:57:21 -03:00
|
|
|
|
2017-04-19 16:29:38 -03:00
|
|
|
|
2019-08-30 14:45:20 -03:00
|
|
|
|
2019-01-22 11:24:34 -02:00
|
|
|
|
2017-04-18 11:33:48 -03:00
|
|
|
|
2019-01-27 13:42:37 +01:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2017-10-09 22:32:59 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2019-08-30 11:11:01 -03:00
|
|
|
|
2012-11-09 11:32:52 -03:00
|
|
|
|
2015-04-09 18:53:55 +03:00
|
|
|
|
2019-07-04 11:32:27 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2017-04-17 16:51:59 -03:00
|
|
|
|
2016-05-12 08:43:11 +00:00
|
|
|
|
perf annotate-data: Add dso->data_types tree
To aggregate accesses to the same data type, add 'data_types' tree in
DSO to maintain data types and find it by name and size.
It might have different data types that happen to have the same name,
so it also compares the size of the type.
Even if it doesn't 100% guarantee, it reduces the possibility of
mis-handling of such conflicts.
And I don't think it's common to have different types with the same
name.
Committer notes:
Very few cases on the Linux kernel, but there are some different types
with the same name, unsure if there is a debug mode in libbpf dedup that
warns about such cases, but there are provisions in pahole for that,
see:
"emit: Notice type shadowing, i.e. multiple types with the same name (enum, struct, union, etc)"
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=4f332dbfd02072e4f410db7bdcda8d6e3422974b
$ pahole --compile > vmlinux.h
$ rm -f a ; make a
cc a.c -o a
$ grep __[0-9] vmlinux.h
union irte__1 {
struct map_info__1;
struct map_info__1 {
struct map_info__1 * next; /* 0 8 */
$
drivers/iommu/amd/amd_iommu_types.h 'union irte'
include/linux/dmar.h 'struct irte'
include/linux/device-mapper.h:
union map_info {
void *ptr;
};
include/linux/mtd/map.h:
struct map_info {
const char *name;
unsigned long size;
resource_size_t phys;
<SNIP>
kernel/events/uprobes.c:
struct map_info {
struct map_info *next;
struct mm_struct *mm;
unsigned long vaddr;
};
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: linux-toolchains@vger.kernel.org
Cc: linux-trace-devel@vger.kernel.org
Link: https://lore.kernel.org/r/20231213001323.718046-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-12-12 16:13:10 -08:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2017-01-17 15:50:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-05 18:48:13 -07:00
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
2020-05-26 18:52:07 +03:00
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2023-04-24 08:51:07 +03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2023-04-24 08:51:07 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 17:03:18 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2016-05-11 22:51:59 +09:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2014-07-29 10:21:58 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2017-01-17 15:50:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2017-01-17 15:50:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-20 12:56:32 +01:00
|
|
|
|
2017-01-17 15:50:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-20 12:56:32 +01:00
|
|
|
|
|
|
|
|
|
2017-01-17 15:50:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2017-01-17 15:50:35 +01:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2017-01-17 15:50:35 +01:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2017-07-05 18:48:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-29 10:21:58 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-29 10:21:58 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2020-05-26 18:52:07 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2020-05-26 18:52:07 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2020-05-26 18:52:07 +03:00
|
|
|
|
|
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
2013-12-10 15:19:23 -03:00
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
2014-07-29 10:21:58 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2013-12-10 16:02:50 -03:00
|
|
|
|
2013-09-18 15:56:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2014-07-29 10:21:58 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2013-08-07 14:38:47 +03:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
2014-07-29 10:21:58 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2013-08-07 14:38:51 +03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2013-08-07 14:38:51 +03:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-03-11 22:30:48 -07:00
|
|
|
|
2020-03-12 20:56:10 +01:00
|
|
|
|
2020-05-12 15:19:19 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Add compression id into 'struct kmod_path'
Store a decompression ID in 'struct kmod_path', so it can be later
stored in 'struct dso'.
Switch 'struct kmod_path's 'comp' from 'bool' to 'int' to return the
compressions array index. Add 0 index item into compressions array, so
that the comp usage stays as it was: 0 - no compression, != 0
compression index.
Update the kmod_path tests.
Committer notes:
Use a designated initializer + terminating comma, e.g. { .fmt = NULL, }, to fix
the build in several distros:
centos:6: util/dso.c:201: error: missing initializer
centos:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
debian:9: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:25: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:26: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:27: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
oraclelinux:6: util/dso.c:201: error: missing initializer
oraclelinux:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
ubuntu:12.04.5: util/dso.c:201:2: error: missing initializer [-Werror=missing-field-initializers]
ubuntu:12.04.5: util/dso.c:201:2: error: (near initialization for 'compressions[0].decompress') [-Werror=missing-field-initializers]
ubuntu:16.04: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:17.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180817094813.15086-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-17 11:48:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:10 +02:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
perf tools: Add compression id into 'struct kmod_path'
Store a decompression ID in 'struct kmod_path', so it can be later
stored in 'struct dso'.
Switch 'struct kmod_path's 'comp' from 'bool' to 'int' to return the
compressions array index. Add 0 index item into compressions array, so
that the comp usage stays as it was: 0 - no compression, != 0
compression index.
Update the kmod_path tests.
Committer notes:
Use a designated initializer + terminating comma, e.g. { .fmt = NULL, }, to fix
the build in several distros:
centos:6: util/dso.c:201: error: missing initializer
centos:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
debian:9: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:25: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:26: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:27: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
oraclelinux:6: util/dso.c:201: error: missing initializer
oraclelinux:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
ubuntu:12.04.5: util/dso.c:201:2: error: missing initializer [-Werror=missing-field-initializers]
ubuntu:12.04.5: util/dso.c:201:2: error: (near initialization for 'compressions[0].decompress') [-Werror=missing-field-initializers]
ubuntu:16.04: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:17.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180817094813.15086-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-17 11:48:06 +02:00
|
|
|
|
perf tools: Add gzip decompression support for kernel module
Now my Archlinux box shows module symbols correctly.
Before:
$ perf report --stdio
Failed to open /tmp/perf-3477.map, continuing without symbols
no symbols found in /usr/bin/date, maybe install a debug package?
No kallsyms or vmlinux with build-id 7b4ea0a49ae2111925857099aaf05c3246ff33e0 was found
[drm] with build id 7b4ea0a49ae2111925857099aaf05c3246ff33e0 not found, continuing without symbols
No kallsyms or vmlinux with build-id edd931629094b660ca9dec09a1b635c8d87aa2ee was found
[jbd2] with build id edd931629094b660ca9dec09a1b635c8d87aa2ee not found, continuing without symbols
No kallsyms or vmlinux with build-id a7b1eada671c34933e5610bb920b2ca4945a82c3 was found
[ext4] with build id a7b1eada671c34933e5610bb920b2ca4945a82c3 not found, continuing without symbols
No kallsyms or vmlinux with build-id d69511fa3e5840e770336ef45b06c83fef8d74e3 was found
[scsi_mod] with build id d69511fa3e5840e770336ef45b06c83fef8d74e3 not found, continuing without symbols
No kallsyms or vmlinux with build-id af0430af13461af058770ee9b87afc07922c2e77 was found
[libata] with build id af0430af13461af058770ee9b87afc07922c2e77 not found, continuing without symbols
No kallsyms or vmlinux with build-id aaeedff8160ce631a5f0333591c6ff291201d29f was found
[libahci] with build id aaeedff8160ce631a5f0333591c6ff291201d29f not found, continuing without symbols
No kallsyms or vmlinux with build-id c57907712becaf662dc4981824bb372c0441d605 was found
[mac80211] with build id c57907712becaf662dc4981824bb372c0441d605 not found, continuing without symbols
No kallsyms or vmlinux with build-id e0589077cc0ec8c3e4c40eb9f2d9e69d236bee8f was found
[iwldvm] with build id e0589077cc0ec8c3e4c40eb9f2d9e69d236bee8f not found, continuing without symbols
No kallsyms or vmlinux with build-id 2d86086bf136bf374a2f029cf85a48194f9b950b was found
[cfg80211] with build id 2d86086bf136bf374a2f029cf85a48194f9b950b not found, continuing without symbols
No kallsyms or vmlinux with build-id 4493c48599bdb3d91d0f8db5150e0be33fdd9221 was found
[iwlwifi] with build id 4493c48599bdb3d91d0f8db5150e0be33fdd9221 not found, continuing without symbols
...
#
# Overhead Command Shared Object Symbol
# ........ ............... ....................... ........................................................
#
0.03% swapper [ext4] [k] 0x000000000000fe2e
0.03% swapper [kernel.kallsyms] [k] account_entity_enqueue
0.03% swapper [ext4] [k] 0x000000000000fc2b
0.03% irq/50-iwlwifi [iwlwifi] [k] 0x000000000000200b
0.03% swapper [kernel.kallsyms] [k] ktime_add_safe
0.03% swapper [kernel.kallsyms] [k] elv_completed_request
0.03% swapper [libata] [k] 0x0000000000003997
0.03% swapper [libahci] [k] 0x0000000000001f25
0.03% swapper [kernel.kallsyms] [k] rb_next
0.03% swapper [kernel.kallsyms] [k] blk_finish_request
0.03% swapper [ext4] [k] 0x0000000000010248
0.00% perf [kernel.kallsyms] [k] native_write_msr_safe
After:
$ perf report --stdio
Failed to open /tmp/perf-3477.map, continuing without symbols
no symbols found in /usr/bin/tr, maybe install a debug package?
...
#
# Overhead Command Shared Object Symbol
# ........ ............... ........................... ......................................................
#
0.04% kworker/u16:3 [ext4] [k] ext4_read_block_bitmap
0.03% kworker/u16:0 [mac80211] [k] ieee80211_sta_reset_beacon_monitor
0.02% irq/50-iwlwifi [mac80211] [k] ieee80211_get_bssid
0.02% firefox [e1000e] [k] __ew32_prepare
0.02% swapper [libahci] [k] ahci_handle_port_interrupt
0.02% emacs libglib-2.0.so.0.4000.0 [.] g_mutex_unlock
0.02% swapper [e1000e] [k] e1000_clean_tx_irq
0.02% dwm [kernel.kallsyms] [k] __schedule
0.02% gnome-terminal- [vdso] [.] __vdso_clock_gettime
0.02% swapper [e1000e] [k] e1000_alloc_rx_buffers
0.02% irq/50-iwlwifi [mac80211] [k] ieee80211_rx
0.01% firefox [vdso] [.] __vdso_gettimeofday
0.01% irq/50-iwlwifi [iwlwifi] [k] iwl_pcie_rxq_restock.part.13
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/87h9yexshi.fsf@sejong.aot.lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-10-31 16:51:38 +09:00
|
|
|
|
2018-08-17 11:48:10 +02:00
|
|
|
|
2015-01-29 13:29:39 +01:00
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:10 +02:00
|
|
|
|
perf tools: Add gzip decompression support for kernel module
Now my Archlinux box shows module symbols correctly.
Before:
$ perf report --stdio
Failed to open /tmp/perf-3477.map, continuing without symbols
no symbols found in /usr/bin/date, maybe install a debug package?
No kallsyms or vmlinux with build-id 7b4ea0a49ae2111925857099aaf05c3246ff33e0 was found
[drm] with build id 7b4ea0a49ae2111925857099aaf05c3246ff33e0 not found, continuing without symbols
No kallsyms or vmlinux with build-id edd931629094b660ca9dec09a1b635c8d87aa2ee was found
[jbd2] with build id edd931629094b660ca9dec09a1b635c8d87aa2ee not found, continuing without symbols
No kallsyms or vmlinux with build-id a7b1eada671c34933e5610bb920b2ca4945a82c3 was found
[ext4] with build id a7b1eada671c34933e5610bb920b2ca4945a82c3 not found, continuing without symbols
No kallsyms or vmlinux with build-id d69511fa3e5840e770336ef45b06c83fef8d74e3 was found
[scsi_mod] with build id d69511fa3e5840e770336ef45b06c83fef8d74e3 not found, continuing without symbols
No kallsyms or vmlinux with build-id af0430af13461af058770ee9b87afc07922c2e77 was found
[libata] with build id af0430af13461af058770ee9b87afc07922c2e77 not found, continuing without symbols
No kallsyms or vmlinux with build-id aaeedff8160ce631a5f0333591c6ff291201d29f was found
[libahci] with build id aaeedff8160ce631a5f0333591c6ff291201d29f not found, continuing without symbols
No kallsyms or vmlinux with build-id c57907712becaf662dc4981824bb372c0441d605 was found
[mac80211] with build id c57907712becaf662dc4981824bb372c0441d605 not found, continuing without symbols
No kallsyms or vmlinux with build-id e0589077cc0ec8c3e4c40eb9f2d9e69d236bee8f was found
[iwldvm] with build id e0589077cc0ec8c3e4c40eb9f2d9e69d236bee8f not found, continuing without symbols
No kallsyms or vmlinux with build-id 2d86086bf136bf374a2f029cf85a48194f9b950b was found
[cfg80211] with build id 2d86086bf136bf374a2f029cf85a48194f9b950b not found, continuing without symbols
No kallsyms or vmlinux with build-id 4493c48599bdb3d91d0f8db5150e0be33fdd9221 was found
[iwlwifi] with build id 4493c48599bdb3d91d0f8db5150e0be33fdd9221 not found, continuing without symbols
...
#
# Overhead Command Shared Object Symbol
# ........ ............... ....................... ........................................................
#
0.03% swapper [ext4] [k] 0x000000000000fe2e
0.03% swapper [kernel.kallsyms] [k] account_entity_enqueue
0.03% swapper [ext4] [k] 0x000000000000fc2b
0.03% irq/50-iwlwifi [iwlwifi] [k] 0x000000000000200b
0.03% swapper [kernel.kallsyms] [k] ktime_add_safe
0.03% swapper [kernel.kallsyms] [k] elv_completed_request
0.03% swapper [libata] [k] 0x0000000000003997
0.03% swapper [libahci] [k] 0x0000000000001f25
0.03% swapper [kernel.kallsyms] [k] rb_next
0.03% swapper [kernel.kallsyms] [k] blk_finish_request
0.03% swapper [ext4] [k] 0x0000000000010248
0.00% perf [kernel.kallsyms] [k] native_write_msr_safe
After:
$ perf report --stdio
Failed to open /tmp/perf-3477.map, continuing without symbols
no symbols found in /usr/bin/tr, maybe install a debug package?
...
#
# Overhead Command Shared Object Symbol
# ........ ............... ........................... ......................................................
#
0.04% kworker/u16:3 [ext4] [k] ext4_read_block_bitmap
0.03% kworker/u16:0 [mac80211] [k] ieee80211_sta_reset_beacon_monitor
0.02% irq/50-iwlwifi [mac80211] [k] ieee80211_get_bssid
0.02% firefox [e1000e] [k] __ew32_prepare
0.02% swapper [libahci] [k] ahci_handle_port_interrupt
0.02% emacs libglib-2.0.so.0.4000.0 [.] g_mutex_unlock
0.02% swapper [e1000e] [k] e1000_clean_tx_irq
0.02% dwm [kernel.kallsyms] [k] __schedule
0.02% gnome-terminal- [vdso] [.] __vdso_clock_gettime
0.02% swapper [e1000e] [k] e1000_alloc_rx_buffers
0.02% irq/50-iwlwifi [mac80211] [k] ieee80211_rx
0.01% firefox [vdso] [.] __vdso_gettimeofday
0.01% irq/50-iwlwifi [iwlwifi] [k] iwl_pcie_rxq_restock.part.13
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/87h9yexshi.fsf@sejong.aot.lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-10-31 16:51:38 +09:00
|
|
|
|
2018-08-17 11:48:10 +02:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
|
|
|
|
|
perf tools: Add compression id into 'struct kmod_path'
Store a decompression ID in 'struct kmod_path', so it can be later
stored in 'struct dso'.
Switch 'struct kmod_path's 'comp' from 'bool' to 'int' to return the
compressions array index. Add 0 index item into compressions array, so
that the comp usage stays as it was: 0 - no compression, != 0
compression index.
Update the kmod_path tests.
Committer notes:
Use a designated initializer + terminating comma, e.g. { .fmt = NULL, }, to fix
the build in several distros:
centos:6: util/dso.c:201: error: missing initializer
centos:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
debian:9: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:25: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:26: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:27: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
oraclelinux:6: util/dso.c:201: error: missing initializer
oraclelinux:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
ubuntu:12.04.5: util/dso.c:201:2: error: missing initializer [-Werror=missing-field-initializers]
ubuntu:12.04.5: util/dso.c:201:2: error: (near initialization for 'compressions[0].decompress') [-Werror=missing-field-initializers]
ubuntu:16.04: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:17.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180817094813.15086-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-17 11:48:06 +02:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Add compression id into 'struct kmod_path'
Store a decompression ID in 'struct kmod_path', so it can be later
stored in 'struct dso'.
Switch 'struct kmod_path's 'comp' from 'bool' to 'int' to return the
compressions array index. Add 0 index item into compressions array, so
that the comp usage stays as it was: 0 - no compression, != 0
compression index.
Update the kmod_path tests.
Committer notes:
Use a designated initializer + terminating comma, e.g. { .fmt = NULL, }, to fix
the build in several distros:
centos:6: util/dso.c:201: error: missing initializer
centos:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
debian:9: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:25: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:26: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:27: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
oraclelinux:6: util/dso.c:201: error: missing initializer
oraclelinux:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
ubuntu:12.04.5: util/dso.c:201:2: error: missing initializer [-Werror=missing-field-initializers]
ubuntu:12.04.5: util/dso.c:201:2: error: (near initialization for 'compressions[0].decompress') [-Werror=missing-field-initializers]
ubuntu:16.04: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:17.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180817094813.15086-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-17 11:48:06 +02:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
perf tools: Add compression id into 'struct kmod_path'
Store a decompression ID in 'struct kmod_path', so it can be later
stored in 'struct dso'.
Switch 'struct kmod_path's 'comp' from 'bool' to 'int' to return the
compressions array index. Add 0 index item into compressions array, so
that the comp usage stays as it was: 0 - no compression, != 0
compression index.
Update the kmod_path tests.
Committer notes:
Use a designated initializer + terminating comma, e.g. { .fmt = NULL, }, to fix
the build in several distros:
centos:6: util/dso.c:201: error: missing initializer
centos:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
debian:9: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:25: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:26: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:27: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
oraclelinux:6: util/dso.c:201: error: missing initializer
oraclelinux:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
ubuntu:12.04.5: util/dso.c:201:2: error: missing initializer [-Werror=missing-field-initializers]
ubuntu:12.04.5: util/dso.c:201:2: error: (near initialization for 'compressions[0].decompress') [-Werror=missing-field-initializers]
ubuntu:16.04: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:17.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180817094813.15086-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-17 11:48:06 +02:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
perf tools: Add compression id into 'struct kmod_path'
Store a decompression ID in 'struct kmod_path', so it can be later
stored in 'struct dso'.
Switch 'struct kmod_path's 'comp' from 'bool' to 'int' to return the
compressions array index. Add 0 index item into compressions array, so
that the comp usage stays as it was: 0 - no compression, != 0
compression index.
Update the kmod_path tests.
Committer notes:
Use a designated initializer + terminating comma, e.g. { .fmt = NULL, }, to fix
the build in several distros:
centos:6: util/dso.c:201: error: missing initializer
centos:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
debian:9: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:25: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:26: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:27: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
oraclelinux:6: util/dso.c:201: error: missing initializer
oraclelinux:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
ubuntu:12.04.5: util/dso.c:201:2: error: missing initializer [-Werror=missing-field-initializers]
ubuntu:12.04.5: util/dso.c:201:2: error: (near initialization for 'compressions[0].decompress') [-Werror=missing-field-initializers]
ubuntu:16.04: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:17.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180817094813.15086-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-17 11:48:06 +02:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
|
|
|
|
|
2015-06-03 08:52:21 +00:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
2015-02-12 15:56:21 +01:00
|
|
|
|
2015-06-03 08:52:21 +00:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
2015-06-03 08:52:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
2015-02-12 15:56:21 +01:00
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2014-11-04 10:14:27 +09:00
|
|
|
|
|
|
|
|
|
2020-11-26 18:00:09 +01:00
|
|
|
|
|
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
2018-08-17 11:48:09 +02:00
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-26 18:00:09 +01:00
|
|
|
|
2018-08-17 11:48:10 +02:00
|
|
|
|
|
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
2020-11-26 18:00:09 +01:00
|
|
|
|
2018-08-17 11:48:08 +02:00
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
2020-11-26 18:00:09 +01:00
|
|
|
|
|
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-06 10:49:46 -03:00
|
|
|
|
2018-08-17 11:48:09 +02:00
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-26 18:00:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2020-11-26 18:00:09 +01:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2020-11-26 18:00:09 +01:00
|
|
|
|
|
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:09 +02:00
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:09 +02:00
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:09 +02:00
|
|
|
|
2017-06-08 16:31:03 +09:00
|
|
|
|
|
|
|
|
|
perf tools: Add kmod_path__parse function
Provides united way of parsing kernel module path
into several components.
The new kmod_path__parse function and few defines:
int __kmod_path__parse(struct kmod_path *m, const char *path,
bool alloc_name, bool alloc_ext);
#define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false)
#define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
#define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true)
parse kernel module @path and updates @m argument like:
@comp - true if @path contains supported compression suffix,
false otherwise
@kmod - true if @path contains '.ko' suffix in right position,
false otherwise
@name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
of the kernel module without suffixes, otherwise strudup-ed
base name of @path
@ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string
the compression suffix
It returns 0 if there's no strdup error, -ENOMEM otherwise.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-02-05 15:40:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:13 +02:00
|
|
|
|
perf tools: Add kmod_path__parse function
Provides united way of parsing kernel module path
into several components.
The new kmod_path__parse function and few defines:
int __kmod_path__parse(struct kmod_path *m, const char *path,
bool alloc_name, bool alloc_ext);
#define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false)
#define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
#define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true)
parse kernel module @path and updates @m argument like:
@comp - true if @path contains supported compression suffix,
false otherwise
@kmod - true if @path contains '.ko' suffix in right position,
false otherwise
@name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
of the kernel module without suffixes, otherwise strudup-ed
base name of @path
@ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string
the compression suffix
It returns 0 if there's no strdup error, -ENOMEM otherwise.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-02-05 15:40:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-03 08:52:21 +00:00
|
|
|
|
perf tools: Add kmod_path__parse function
Provides united way of parsing kernel module path
into several components.
The new kmod_path__parse function and few defines:
int __kmod_path__parse(struct kmod_path *m, const char *path,
bool alloc_name, bool alloc_ext);
#define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false)
#define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
#define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true)
parse kernel module @path and updates @m argument like:
@comp - true if @path contains supported compression suffix,
false otherwise
@kmod - true if @path contains '.ko' suffix in right position,
false otherwise
@name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
of the kernel module without suffixes, otherwise strudup-ed
base name of @path
@ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string
the compression suffix
It returns 0 if there's no strdup error, -ENOMEM otherwise.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-02-05 15:40:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-03 08:52:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-04 15:56:54 +03:00
|
|
|
|
|
|
|
|
|
2015-06-03 08:52:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Add kmod_path__parse function
Provides united way of parsing kernel module path
into several components.
The new kmod_path__parse function and few defines:
int __kmod_path__parse(struct kmod_path *m, const char *path,
bool alloc_name, bool alloc_ext);
#define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false)
#define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
#define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true)
parse kernel module @path and updates @m argument like:
@comp - true if @path contains supported compression suffix,
false otherwise
@kmod - true if @path contains '.ko' suffix in right position,
false otherwise
@name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
of the kernel module without suffixes, otherwise strudup-ed
base name of @path
@ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string
the compression suffix
It returns 0 if there's no strdup error, -ENOMEM otherwise.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-02-05 15:40:25 +01:00
|
|
|
|
2015-06-03 08:52:21 +00:00
|
|
|
|
perf tools: Add kmod_path__parse function
Provides united way of parsing kernel module path
into several components.
The new kmod_path__parse function and few defines:
int __kmod_path__parse(struct kmod_path *m, const char *path,
bool alloc_name, bool alloc_ext);
#define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false)
#define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
#define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true)
parse kernel module @path and updates @m argument like:
@comp - true if @path contains supported compression suffix,
false otherwise
@kmod - true if @path contains '.ko' suffix in right position,
false otherwise
@name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
of the kernel module without suffixes, otherwise strudup-ed
base name of @path
@ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string
the compression suffix
It returns 0 if there's no strdup error, -ENOMEM otherwise.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-02-05 15:40:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Add compression id into 'struct kmod_path'
Store a decompression ID in 'struct kmod_path', so it can be later
stored in 'struct dso'.
Switch 'struct kmod_path's 'comp' from 'bool' to 'int' to return the
compressions array index. Add 0 index item into compressions array, so
that the comp usage stays as it was: 0 - no compression, != 0
compression index.
Update the kmod_path tests.
Committer notes:
Use a designated initializer + terminating comma, e.g. { .fmt = NULL, }, to fix
the build in several distros:
centos:6: util/dso.c:201: error: missing initializer
centos:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
debian:9: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:25: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:26: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
fedora:27: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
oraclelinux:6: util/dso.c:201: error: missing initializer
oraclelinux:6: util/dso.c:201: error: (near initialization for 'compressions[0].decompress')
ubuntu:12.04.5: util/dso.c:201:2: error: missing initializer [-Werror=missing-field-initializers]
ubuntu:12.04.5: util/dso.c:201:2: error: (near initialization for 'compressions[0].decompress') [-Werror=missing-field-initializers]
ubuntu:16.04: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:16.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
ubuntu:17.10: util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180817094813.15086-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-17 11:48:06 +02:00
|
|
|
|
|
|
|
|
|
perf tools: Add kmod_path__parse function
Provides united way of parsing kernel module path
into several components.
The new kmod_path__parse function and few defines:
int __kmod_path__parse(struct kmod_path *m, const char *path,
bool alloc_name, bool alloc_ext);
#define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false)
#define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
#define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true)
parse kernel module @path and updates @m argument like:
@comp - true if @path contains supported compression suffix,
false otherwise
@kmod - true if @path contains '.ko' suffix in right position,
false otherwise
@name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
of the kernel module without suffixes, otherwise strudup-ed
base name of @path
@ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string
the compression suffix
It returns 0 if there's no strdup error, -ENOMEM otherwise.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-02-05 15:40:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-26 12:45:09 -03:00
|
|
|
|
perf tools: Add kmod_path__parse function
Provides united way of parsing kernel module path
into several components.
The new kmod_path__parse function and few defines:
int __kmod_path__parse(struct kmod_path *m, const char *path,
bool alloc_name, bool alloc_ext);
#define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false)
#define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
#define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true)
parse kernel module @path and updates @m argument like:
@comp - true if @path contains supported compression suffix,
false otherwise
@kmod - true if @path contains '.ko' suffix in right position,
false otherwise
@name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
of the kernel module without suffixes, otherwise strudup-ed
base name of @path
@ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string
the compression suffix
It returns 0 if there's no strdup error, -ENOMEM otherwise.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-02-05 15:40:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-31 21:01:04 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2017-05-31 21:01:04 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2017-05-31 21:01:04 +09:00
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:07 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:07 +02:00
|
|
|
|
2017-05-31 21:01:04 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2017-05-31 21:01:04 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
2014-04-30 15:25:10 +02:00
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
2014-04-30 15:25:10 +02:00
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-05-06 11:01:04 -07:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-05-06 11:01:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 15:25:10 +02:00
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-05-06 11:01:04 -07:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-05-06 11:01:04 -07:00
|
|
|
|
2014-04-30 15:25:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
2014-05-07 21:35:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-14 02:22:36 +00:00
|
|
|
|
2014-05-07 21:35:02 +02:00
|
|
|
|
|
|
|
|
|
perf symbols: Using O_CLOEXEC in do_open
I've meet a strange behavior with these commands on my gentoo box:
1: perf kmem record
2: CTRL-C to stop 1
3: perf report
4: "Enter", "Enter", "Run scripts for all samples",
"event_analyzing_sample".
Then 'perf report' says:
"
No kallsyms or vmlinux with build-id xxxx was found
/lib/modules/4.10.0+/build/vmlinux with build id xxxx not found,
continuing without symbols
".
It is strange because I am sure /lib/modules/4.10.0+/build/vmlinux is
right for perf.data.
After digging, I found out the reason is that "perf report" generates
many open fds, then "script_browse" uses popen to run "perf script"
which run out of open files.
The gentoo box has a small default value for "max open files", 1024.
Yes, "ulimit -n " with a bigger number could fix it, but I think that
using O_CLOEXEC in do_open is a better way.
Signed-off-by: Wang YanQing <udknight@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180115050448.GA20759@udknight
[ Make sure O_CLOEXEC is available in old systems by adding a patch
just before this one, to keep this bisectable in such systems ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-01-15 13:04:48 +08:00
|
|
|
|
2014-05-07 21:35:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-30 11:33:29 +09:00
|
|
|
|
tools: Introduce str_error_r()
The tools so far have been using the strerror_r() GNU variant, that
returns a string, be it the buffer passed or something else.
But that, besides being tricky in cases where we expect that the
function using strerror_r() returns the error formatted in a provided
buffer (we have to check if it returned something else and copy that
instead), breaks the build on systems not using glibc, like Alpine
Linux, where musl libc is used.
So, introduce yet another wrapper, str_error_r(), that has the GNU
interface, but uses the portable XSI variant of strerror_r(), so that
users rest asured that the provided buffer is used and it is what is
returned.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-d4t42fnf48ytlk8rjxs822tf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-07-06 11:56:20 -03:00
|
|
|
|
2014-05-07 21:35:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-17 18:28:01 -03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2023-04-17 18:28:01 -03:00
|
|
|
|
|
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2017-06-08 16:31:06 +09:00
|
|
|
|
2013-12-16 17:03:18 -03:00
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:03 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2017-06-08 16:31:06 +09:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2022-02-01 23:08:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2022-02-01 23:08:26 -08:00
|
|
|
|
|
|
|
|
|
2023-04-17 18:28:01 -03:00
|
|
|
|
2022-02-01 23:08:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-20 18:12:45 +02:00
|
|
|
|
2017-06-08 16:31:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2017-06-08 16:31:06 +09:00
|
|
|
|
2017-06-08 16:31:05 +09:00
|
|
|
|
|
|
|
|
|
2018-08-17 11:48:03 +02:00
|
|
|
|
2017-06-08 16:31:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-07 21:35:02 +02:00
|
|
|
|
2017-06-08 16:31:05 +09:00
|
|
|
|
2018-08-17 11:48:03 +02:00
|
|
|
|
2017-06-08 16:31:05 +09:00
|
|
|
|
|
|
|
|
|
2017-06-08 16:31:06 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
2014-05-07 21:09:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
2017-07-05 18:48:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-26 09:42:38 -07:00
|
|
|
|
2017-07-05 18:48:11 -07:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2017-07-05 18:48:11 -07:00
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
2014-07-17 11:43:09 +03:00
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-28 16:43:43 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
2014-04-28 16:43:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-07 21:09:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-05-06 11:01:04 -07:00
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-05-06 11:01:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-28 13:29:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
2016-06-28 13:29:02 +02:00
|
|
|
|
|
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
2016-06-28 13:29:02 +02:00
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
2016-06-28 13:29:02 +02:00
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
2014-05-07 21:09:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf tools: Cache dso data file descriptor
Caching dso data file descriptors to avoid expensive re-opens
especially during DWARF unwind.
We keep dsos data file descriptors open until their count reaches
the half of the current fd open limit (RLIMIT_NOFILE). In this case
we close file descriptor of the first opened dso object.
We've got overall speedup (~27% for my workload) of report:
'perf report --stdio -i perf-test.data' (3 runs)
(perf-test.data size was around 12GB)
current code:
545,640,944,228 cycles ( +- 0.53% )
785,255,798,320 instructions ( +- 0.03% )
366.340910010 seconds time elapsed ( +- 3.65% )
after change:
435,895,036,114 cycles ( +- 0.26% )
636,790,271,176 instructions ( +- 0.04% )
266.481463387 seconds time elapsed ( +- 0.13% )
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-04-30 15:47:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-07 21:09:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
2014-04-30 15:00:59 +02:00
|
|
|
|
|
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2013-12-16 16:57:43 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2014-04-28 16:43:43 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2014-07-22 16:17:18 +03:00
|
|
|
|
2014-04-28 16:43:43 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2014-07-22 16:17:18 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2014-07-22 16:17:18 +03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2014-07-22 16:17:18 +03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
|
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
|
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-22 16:17:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2014-07-22 16:17:19 +03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2014-07-22 16:17:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-20 15:57:21 -03:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
|
|
|
|
|
2020-10-20 15:57:21 -03:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2015-05-18 09:30:41 +09:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:56 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2013-12-10 15:46:29 -03:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-18 09:30:41 +09:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-18 09:30:41 +09:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-18 09:30:41 +09:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-18 09:30:41 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-18 09:30:41 +09:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-08 15:20:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2019-05-08 15:20:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2019-05-08 15:20:01 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2015-05-18 09:30:41 +09:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2019-05-08 15:20:01 +02:00
|
|
|
|
2019-10-25 15:59:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
2020-10-20 15:57:21 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-10-25 15:59:56 +03:00
|
|
|
|
2020-10-20 15:57:21 -03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2020-05-12 15:19:19 +03:00
|
|
|
|
2019-10-25 15:59:56 +03:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2019-10-25 15:59:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:56 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2019-10-25 15:59:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2014-05-07 21:09:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
2014-05-07 21:09:59 +02:00
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-08 15:19:59 +02:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
2014-08-14 02:22:36 +00:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
|
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-21 01:03:39 +09:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
|
|
|
|
|
tools: Introduce str_error_r()
The tools so far have been using the strerror_r() GNU variant, that
returns a string, be it the buffer passed or something else.
But that, besides being tricky in cases where we expect that the
function using strerror_r() returns the error formatted in a provided
buffer (we have to check if it returned something else and copy that
instead), breaks the build on systems not using glibc, like Alpine
Linux, where musl libc is used.
So, introduce yet another wrapper, str_error_r(), that has the GNU
interface, but uses the portable XSI variant of strerror_r(), so that
users rest asured that the provided buffer is used and it is what is
returned.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-d4t42fnf48ytlk8rjxs822tf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-07-06 11:56:20 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-18 09:30:42 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
|
|
|
|
|
2019-05-08 15:19:59 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:19:59 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:19:59 +02:00
|
|
|
|
2020-10-20 15:57:21 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-05-08 15:20:02 +02:00
|
|
|
|
2020-10-20 15:57:21 -03:00
|
|
|
|
2019-05-08 15:19:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-22 16:17:35 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-27 10:46:34 +02:00
|
|
|
|
2014-07-22 16:17:35 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2014-07-22 16:17:35 +03:00
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
2018-11-27 10:46:34 +02:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
|
|
|
|
|
2014-05-07 21:09:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
2014-05-07 18:51:41 +02:00
|
|
|
|
|
|
|
|
|
2014-05-07 21:09:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-04 13:59:44 -07:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-04 13:59:44 -07:00
|
|
|
|
|
|
|
|
|
2019-10-25 15:59:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-15 18:07:11 +02:00
|
|
|
|
2018-04-26 16:52:34 -03:00
|
|
|
|
2021-07-15 18:07:11 +02:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-28 12:40:55 -03:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-29 11:31:12 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-10 11:11:46 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-11-13 11:48:30 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2013-12-10 15:08:44 -03:00
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2013-12-10 15:08:44 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-13 11:48:30 +02:00
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf dso: Move dso_id from 'struct map' to 'struct dso'
And take it into account when looking up DSOs when we have the dso_id
fields obtained from somewhere, like from PERF_RECORD_MMAP2 records.
Instances of struct map pointing to the same DSO pathname but with
anything in dso_id different are in fact different DSOs, so better have
different 'struct dso' instances to reflect that. At some point we may
want to get copies of the contents of the different objects if we want
to do correct annotation or other analysis.
With this we get 'struct map' 24 bytes leaner:
$ pahole -C map ~/bin/perf
struct map {
union {
struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */
struct list_head node; /* 0 16 */
} __attribute__((__aligned__(8))); /* 0 24 */
u64 start; /* 24 8 */
u64 end; /* 32 8 */
_Bool erange_warned:1; /* 40: 0 1 */
_Bool priv:1; /* 40: 1 1 */
/* XXX 6 bits hole, try to pack */
/* XXX 3 bytes hole, try to pack */
u32 prot; /* 44 4 */
u64 pgoff; /* 48 8 */
u64 reloc; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
u64 (*map_ip)(struct map *, u64); /* 64 8 */
u64 (*unmap_ip)(struct map *, u64); /* 72 8 */
struct dso * dso; /* 80 8 */
refcount_t refcnt; /* 88 4 */
u32 flags; /* 92 4 */
/* size: 96, cachelines: 2, members: 13 */
/* sum members: 92, holes: 1, sum holes: 3 */
/* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */
/* forced alignments: 1 */
/* last cacheline: 32 bytes */
} __attribute__((__aligned__(8)));
$
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-g4hxxmraplo7wfjmk384mfsb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-11-19 18:44:22 -03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
2024-04-09 23:42:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
2024-04-09 23:42:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-16 23:44:33 -07:00
|
|
|
|
2024-04-09 23:42:06 -07:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-09 23:42:06 -07:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
2024-04-09 23:42:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-04-09 23:42:06 -07:00
|
|
|
|
|
|
|
|
|
perf dso: Move dso_id from 'struct map' to 'struct dso'
And take it into account when looking up DSOs when we have the dso_id
fields obtained from somewhere, like from PERF_RECORD_MMAP2 records.
Instances of struct map pointing to the same DSO pathname but with
anything in dso_id different are in fact different DSOs, so better have
different 'struct dso' instances to reflect that. At some point we may
want to get copies of the contents of the different objects if we want
to do correct annotation or other analysis.
With this we get 'struct map' 24 bytes leaner:
$ pahole -C map ~/bin/perf
struct map {
union {
struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */
struct list_head node; /* 0 16 */
} __attribute__((__aligned__(8))); /* 0 24 */
u64 start; /* 24 8 */
u64 end; /* 32 8 */
_Bool erange_warned:1; /* 40: 0 1 */
_Bool priv:1; /* 40: 1 1 */
/* XXX 6 bits hole, try to pack */
/* XXX 3 bytes hole, try to pack */
u32 prot; /* 44 4 */
u64 pgoff; /* 48 8 */
u64 reloc; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
u64 (*map_ip)(struct map *, u64); /* 64 8 */
u64 (*unmap_ip)(struct map *, u64); /* 72 8 */
struct dso * dso; /* 80 8 */
refcount_t refcnt; /* 88 4 */
u32 flags; /* 92 4 */
/* size: 96, cachelines: 2, members: 13 */
/* sum members: 92, holes: 1, sum holes: 3 */
/* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */
/* forced alignments: 1 */
/* last cacheline: 32 bytes */
} __attribute__((__aligned__(8)));
$
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-g4hxxmraplo7wfjmk384mfsb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-11-19 18:44:22 -03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2013-12-10 11:11:46 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2013-12-10 11:11:46 -03:00
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2013-12-10 11:11:46 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:37:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-17 17:17:38 +09:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2018-04-26 16:52:34 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2018-04-26 16:52:34 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2018-04-26 16:52:34 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2024-08-16 23:44:33 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
perf dso: Move dso_id from 'struct map' to 'struct dso'
And take it into account when looking up DSOs when we have the dso_id
fields obtained from somewhere, like from PERF_RECORD_MMAP2 records.
Instances of struct map pointing to the same DSO pathname but with
anything in dso_id different are in fact different DSOs, so better have
different 'struct dso' instances to reflect that. At some point we may
want to get copies of the contents of the different objects if we want
to do correct annotation or other analysis.
With this we get 'struct map' 24 bytes leaner:
$ pahole -C map ~/bin/perf
struct map {
union {
struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */
struct list_head node; /* 0 16 */
} __attribute__((__aligned__(8))); /* 0 24 */
u64 start; /* 24 8 */
u64 end; /* 32 8 */
_Bool erange_warned:1; /* 40: 0 1 */
_Bool priv:1; /* 40: 1 1 */
/* XXX 6 bits hole, try to pack */
/* XXX 3 bytes hole, try to pack */
u32 prot; /* 44 4 */
u64 pgoff; /* 48 8 */
u64 reloc; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
u64 (*map_ip)(struct map *, u64); /* 64 8 */
u64 (*unmap_ip)(struct map *, u64); /* 72 8 */
struct dso * dso; /* 80 8 */
refcount_t refcnt; /* 88 4 */
u32 flags; /* 92 4 */
/* size: 96, cachelines: 2, members: 13 */
/* sum members: 92, holes: 1, sum holes: 3 */
/* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */
/* forced alignments: 1 */
/* last cacheline: 32 bytes */
} __attribute__((__aligned__(8)));
$
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-g4hxxmraplo7wfjmk384mfsb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-11-19 18:44:22 -03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2023-06-22 22:45:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-06 11:18:15 -08:00
|
|
|
|
|
|
|
|
|
perf annotate-data: Add dso->data_types tree
To aggregate accesses to the same data type, add 'data_types' tree in
DSO to maintain data types and find it by name and size.
It might have different data types that happen to have the same name,
so it also compares the size of the type.
Even if it doesn't 100% guarantee, it reduces the possibility of
mis-handling of such conflicts.
And I don't think it's common to have different types with the same
name.
Committer notes:
Very few cases on the Linux kernel, but there are some different types
with the same name, unsure if there is a debug mode in libbpf dedup that
warns about such cases, but there are provisions in pahole for that,
see:
"emit: Notice type shadowing, i.e. multiple types with the same name (enum, struct, union, etc)"
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=4f332dbfd02072e4f410db7bdcda8d6e3422974b
$ pahole --compile > vmlinux.h
$ rm -f a ; make a
cc a.c -o a
$ grep __[0-9] vmlinux.h
union irte__1 {
struct map_info__1;
struct map_info__1 {
struct map_info__1 * next; /* 0 8 */
$
drivers/iommu/amd/amd_iommu_types.h 'union irte'
include/linux/dmar.h 'struct irte'
include/linux/device-mapper.h:
union map_info {
void *ptr;
};
include/linux/mtd/map.h:
struct map_info {
const char *name;
unsigned long size;
resource_size_t phys;
<SNIP>
kernel/events/uprobes.c:
struct map_info {
struct map_info *next;
struct mm_struct *mm;
unsigned long vaddr;
};
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: linux-toolchains@vger.kernel.org
Cc: linux-trace-devel@vger.kernel.org
Link: https://lore.kernel.org/r/20231213001323.718046-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-12-12 16:13:10 -08:00
|
|
|
|
2024-03-18 22:51:14 -07:00
|
|
|
|
2014-04-28 16:43:43 +02:00
|
|
|
|
2014-07-22 16:17:18 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2013-12-17 16:14:07 -03:00
|
|
|
|
2014-07-14 13:02:41 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2013-08-07 14:38:50 +03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2013-09-11 14:09:31 +09:00
|
|
|
|
2013-12-03 09:23:10 +02:00
|
|
|
|
2020-08-08 14:21:54 +02:00
|
|
|
|
2023-09-28 13:22:12 +05:30
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2018-08-17 11:48:07 +02:00
|
|
|
|
2022-08-26 09:42:35 -07:00
|
|
|
|
2017-02-21 17:34:58 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-06 11:01:04 -07:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2024-05-06 11:01:04 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
perf dso: Move dso_id from 'struct map' to 'struct dso'
And take it into account when looking up DSOs when we have the dso_id
fields obtained from somewhere, like from PERF_RECORD_MMAP2 records.
Instances of struct map pointing to the same DSO pathname but with
anything in dso_id different are in fact different DSOs, so better have
different 'struct dso' instances to reflect that. At some point we may
want to get copies of the contents of the different objects if we want
to do correct annotation or other analysis.
With this we get 'struct map' 24 bytes leaner:
$ pahole -C map ~/bin/perf
struct map {
union {
struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */
struct list_head node; /* 0 16 */
} __attribute__((__aligned__(8))); /* 0 24 */
u64 start; /* 24 8 */
u64 end; /* 32 8 */
_Bool erange_warned:1; /* 40: 0 1 */
_Bool priv:1; /* 40: 1 1 */
/* XXX 6 bits hole, try to pack */
/* XXX 3 bytes hole, try to pack */
u32 prot; /* 44 4 */
u64 pgoff; /* 48 8 */
u64 reloc; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
u64 (*map_ip)(struct map *, u64); /* 64 8 */
u64 (*unmap_ip)(struct map *, u64); /* 72 8 */
struct dso * dso; /* 80 8 */
refcount_t refcnt; /* 88 4 */
u32 flags; /* 92 4 */
/* size: 96, cachelines: 2, members: 13 */
/* sum members: 92, holes: 1, sum holes: 3 */
/* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */
/* forced alignments: 1 */
/* last cacheline: 32 bytes */
} __attribute__((__aligned__(8)));
$
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-g4hxxmraplo7wfjmk384mfsb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-11-19 18:44:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2017-10-09 22:32:59 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf annotate-data: Add dso->data_types tree
To aggregate accesses to the same data type, add 'data_types' tree in
DSO to maintain data types and find it by name and size.
It might have different data types that happen to have the same name,
so it also compares the size of the type.
Even if it doesn't 100% guarantee, it reduces the possibility of
mis-handling of such conflicts.
And I don't think it's common to have different types with the same
name.
Committer notes:
Very few cases on the Linux kernel, but there are some different types
with the same name, unsure if there is a debug mode in libbpf dedup that
warns about such cases, but there are provisions in pahole for that,
see:
"emit: Notice type shadowing, i.e. multiple types with the same name (enum, struct, union, etc)"
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=4f332dbfd02072e4f410db7bdcda8d6e3422974b
$ pahole --compile > vmlinux.h
$ rm -f a ; make a
cc a.c -o a
$ grep __[0-9] vmlinux.h
union irte__1 {
struct map_info__1;
struct map_info__1 {
struct map_info__1 * next; /* 0 8 */
$
drivers/iommu/amd/amd_iommu_types.h 'union irte'
include/linux/dmar.h 'struct irte'
include/linux/device-mapper.h:
union map_info {
void *ptr;
};
include/linux/mtd/map.h:
struct map_info {
const char *name;
unsigned long size;
resource_size_t phys;
<SNIP>
kernel/events/uprobes.c:
struct map_info {
struct map_info *next;
struct mm_struct *mm;
unsigned long vaddr;
};
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: linux-toolchains@vger.kernel.org
Cc: linux-trace-devel@vger.kernel.org
Link: https://lore.kernel.org/r/20231213001323.718046-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-12-12 16:13:10 -08:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-10 15:26:55 -03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-10 15:26:55 -03:00
|
|
|
|
|
|
|
|
|
2014-04-28 16:43:43 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-05-18 09:30:41 +09:00
|
|
|
|
2013-12-03 09:23:07 +02:00
|
|
|
|
2024-07-15 10:47:13 +01:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2015-06-02 11:53:26 -03:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-02 11:53:26 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-06-02 11:53:26 -03:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2015-06-02 11:53:26 -03:00
|
|
|
|
|
|
|
|
|
2020-10-13 21:24:37 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2020-10-13 21:24:38 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-10 15:46:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-10 15:46:30 -07:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-13 21:24:40 +02:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2016-05-11 22:51:59 +09:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-26 16:52:34 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
|
|
|
|
|
2018-04-26 16:52:34 -03:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2012-10-27 23:18:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-22 16:17:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
2014-07-22 16:17:59 +03:00
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-22 16:17:59 +03:00
|
|
|
|
2015-05-21 01:03:41 +09:00
|
|
|
|
2014-07-22 16:17:59 +03:00
|
|
|
|
2015-03-24 11:49:02 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-04 14:38:01 -07:00
|
|
|
|
2015-03-24 11:49:02 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tools: Introduce str_error_r()
The tools so far have been using the strerror_r() GNU variant, that
returns a string, be it the buffer passed or something else.
But that, besides being tricky in cases where we expect that the
function using strerror_r() returns the error formatted in a provided
buffer (we have to check if it returned something else and copy that
instead), breaks the build on systems not using glibc, like Alpine
Linux, where musl libc is used.
So, introduce yet another wrapper, str_error_r(), that has the GNU
interface, but uses the portable XSI variant of strerror_r(), so that
users rest asured that the provided buffer is used and it is what is
returned.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-d4t42fnf48ytlk8rjxs822tf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-07-06 11:56:20 -03:00
|
|
|
|
2015-03-24 11:49:02 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-23 12:18:48 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|