Commit-ID: 3866058ef15b6ae6f4ff48e088428b46bcc43fa1
Gitweb: http://git.kernel.org/tip/3866058ef15b6ae6f4ff48e088428b46bcc43fa1
Author: David Carrillo-Cisneros
AuthorDate: Sun, 27 Aug 2017 00:54:40 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 28 Aug 2017 16:44:46 -0300
Commit-ID: 70ff7c6caa2f2cee4a7621f5cb3b73b0a38327f1
Gitweb: http://git.kernel.org/tip/70ff7c6caa2f2cee4a7621f5cb3b73b0a38327f1
Author: David Carrillo-Cisneros
AuthorDate: Sun, 27 Aug 2017 00:54:42 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 28 Aug 2017 16:44:46 -0300
Commit-ID: 12024aacb0170779cd0b976b06d2e9b1767cf142
Gitweb: http://git.kernel.org/tip/12024aacb0170779cd0b976b06d2e9b1767cf142
Author: David Carrillo-Cisneros
AuthorDate: Sun, 27 Aug 2017 00:54:39 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 28 Aug 2017 16:44:45 -0300
Commit-ID: 39a59f1e3ea541035637432db39158a461f29146
Gitweb: http://git.kernel.org/tip/39a59f1e3ea541035637432db39158a461f29146
Author: David Carrillo-Cisneros
AuthorDate: Sun, 27 Aug 2017 00:54:38 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 28 Aug 2017 16:44:45 -0300
Commit-ID: ba5d1a48aab56a2677113d071b5b1446877b9a1a
Gitweb: http://git.kernel.org/tip/ba5d1a48aab56a2677113d071b5b1446877b9a1a
Author: David Carrillo-Cisneros
AuthorDate: Sun, 27 Aug 2017 00:54:37 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 28 Aug 2017 16:44:44 -0300
On Mon, Aug 28, 2017 at 7:16 AM, Arnaldo Carvalho de Melo
wrote:
> Em Mon, Aug 28, 2017 at 11:34:21AM +0200, Jiri Olsa escreveu:
>> On Sun, Aug 27, 2017 at 12:54:36AM -0700, David Carrillo-Cisneros wrote:
>> > Collection of minor fixes to compile with LLVM and
>> &
error when possible.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/builtin-lock.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index ff98652484a7..55d3997ce194 100644
--- a/tools/perf/builti
Prior to this patch, make scripts tested for CLANG with
ifeq ($(CC), clang), failing to detect CLANG binaries with
different names. Fix it by testing for the existence of
__clang__ macro in the list of compiler defined macros.
Signed-off-by: David Carrillo-Cisneros
---
tools/lib/api/Makefile
Allow user to define flex and bison binary names by passing
FLEX and BISON variables.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/Makefile.perf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index
When building with an external FEATURES_DUMP, bpf complains
that features dump file is not found. Fix it by passing full file path.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b
Use already defined values for CC, AR and LD when available.
Signed-off-by: David Carrillo-Cisneros
---
tools/lib/api/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile
index eb6e0b36bfc1..2538675731c7 100644
--- a
t and use it instead.
Signed-off-by: David Carrillo-Cisneros
---
tools/include/linux/kernel.h | 2 ++
tools/perf/builtin-lock.c| 15 ++-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
index 77d2e94ca5df.
Collection of minor fixes to compile with LLVM and
non-standard tool names.
David Carrillo-Cisneros (6):
tools build tests: Don't hardcode gcc name
perf tools: Allow external definition of flex and bison binary names
tools lib: Allow external definition of CC, AR and LD
perf
Use $(CC) instead of harcoded gcc binary name.
Signed-off-by: David Carrillo-Cisneros
---
tools/build/tests/ex/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/build/tests/ex/Makefile b/tools/build/tests/ex/Makefile
index c50d5782ad5a..027d6c8a58a7 100644
--- a
Commit-ID: cb281fea4b0a326d2a2104f8ffae2b6895c561fd
Gitweb: http://git.kernel.org/tip/cb281fea4b0a326d2a2104f8ffae2b6895c561fd
Author: David Carrillo-Cisneros
AuthorDate: Tue, 18 Jul 2017 18:18:37 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 25 Jul 2017 11:23:51 -0300
Commit-ID: f4849599086c6462d65543637058c9b55f4803e4
Gitweb: http://git.kernel.org/tip/f4849599086c6462d65543637058c9b55f4803e4
Author: David Carrillo-Cisneros
AuthorDate: Tue, 18 Jul 2017 18:18:38 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 25 Jul 2017 11:23:52 -0300
On Sat, Jul 22, 2017 at 4:09 PM, Namhyung Kim wrote:
> On Fri, Jul 21, 2017 at 01:02:50PM -0700, David Carrillo-Cisneros wrote:
>> On Fri, Jul 21, 2017 at 12:44 AM, Jiri Olsa wrote:
>> > On Thu, Jul 20, 2017 at 10:11:57PM -0700, David Carrillo-Cisneros wrote:
>> >&
On Fri, Jul 21, 2017 at 12:44 AM, Jiri Olsa wrote:
> On Thu, Jul 20, 2017 at 10:11:57PM -0700, David Carrillo-Cisneros wrote:
>> Fixes bug noted by Jiri in https://lkml.org/lkml/2017/6/13/755 and caused
>> by commit d49dadea7862 ("perf tools: Make 'trace' or 't
yms] [k] context_switch
2.34% sleeplibc-2.19.so [.] __GI___libc_nanosleep
0.11% perf [kernel.kallsyms] [k] __intel_pmu_enable_a
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/evlist.h | 5 +
tools/perf/util/sort.c | 2 +-
2 files changed, 6 insertions(+),
Commit-ID: a4d8c9855a260359655f2a302ee2b231cad379ca
Gitweb: http://git.kernel.org/tip/a4d8c9855a260359655f2a302ee2b231cad379ca
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:46 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:35 -0300
Commit-ID: f9ebdccf2b78e643d1ba2c979fa293c9d1e8ba86
Gitweb: http://git.kernel.org/tip/f9ebdccf2b78e643d1ba2c979fa293c9d1e8ba86
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:49 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:37 -0300
Commit-ID: e9def1b2e74e3d2134133f70d2a84c242446bbe7
Gitweb: http://git.kernel.org/tip/e9def1b2e74e3d2134133f70d2a84c242446bbe7
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:48 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:36 -0300
Commit-ID: ccebbeb6b69e4e172450d32f1059fefd1659ad8c
Gitweb: http://git.kernel.org/tip/ccebbeb6b69e4e172450d32f1059fefd1659ad8c
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:39 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:31 -0300
Commit-ID: 114f709e01e62760a6d03de1358188293dfefdda
Gitweb: http://git.kernel.org/tip/114f709e01e62760a6d03de1358188293dfefdda
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:47 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:36 -0300
Commit-ID: 0b3d34106c18e5d9ebba004f52a2ce8b264c493e
Gitweb: http://git.kernel.org/tip/0b3d34106c18e5d9ebba004f52a2ce8b264c493e
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:45 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:34 -0300
Commit-ID: a02c39595e40b4c506c78857e24fdb049096
Gitweb: http://git.kernel.org/tip/a02c39595e40b4c506c78857e24fdb049096
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:44 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:34 -0300
Commit-ID: 48e5fcea386009fb2515158fdaf8586ce72d86ce
Gitweb: http://git.kernel.org/tip/48e5fcea386009fb2515158fdaf8586ce72d86ce
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:43 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:33 -0300
Commit-ID: cfc654209e27ecaa36f550a0934f3c78f9c9179f
Gitweb: http://git.kernel.org/tip/cfc654209e27ecaa36f550a0934f3c78f9c9179f
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:40 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:31 -0300
Commit-ID: 625524572391326b83f906efe02abbaac9debce6
Gitweb: http://git.kernel.org/tip/625524572391326b83f906efe02abbaac9debce6
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:42 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:33 -0300
Commit-ID: 1a22275449f4bd6255e24f0c5b6c7fa61b263417
Gitweb: http://git.kernel.org/tip/1a22275449f4bd6255e24f0c5b6c7fa61b263417
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:41 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:32 -0300
Commit-ID: 3b8f51a677ce574f69671e3f7822b4d8f8634ef3
Gitweb: http://git.kernel.org/tip/3b8f51a677ce574f69671e3f7822b4d8f8634ef3
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:38 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:30 -0300
Commit-ID: 6200e49423f8023eba54cf0b01076d6f8c0af6ae
Gitweb: http://git.kernel.org/tip/6200e49423f8023eba54cf0b01076d6f8c0af6ae
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:34 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:27 -0300
Commit-ID: 7c72440506e2108494bab3b68a4118fa61a9dbf4
Gitweb: http://git.kernel.org/tip/7c72440506e2108494bab3b68a4118fa61a9dbf4
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:37 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:29 -0300
Commit-ID: 2ff5365d75e164032f64133914046fd6be213d94
Gitweb: http://git.kernel.org/tip/2ff5365d75e164032f64133914046fd6be213d94
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:36 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:29 -0300
Commit-ID: dfaa1580efcfb6b9537043ba0447747d7179fb26
Gitweb: http://git.kernel.org/tip/dfaa1580efcfb6b9537043ba0447747d7179fb26
Author: David Carrillo-Cisneros
AuthorDate: Mon, 17 Jul 2017 21:25:35 -0700
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 18 Jul 2017 23:14:28 -0300
d. So
this patch fixes the linker error by getting rid of unwanted libraries
in the linker stage.
Fixes: 209045adc2bb ("perf tools: add JVMTI agent library")
Acked-by: Jiri Olsa
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Stephane Eranian
Signed-off-by: Sudeep Holla
Acked-by: Dav
libelf:
EXCLUDE_EXTLIBS=-lelf EXTRA_PERFLIBS=path/libelf.a
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/Makefile.perf | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 5008f51a08a2..100a6c1670c8 100644
Pickup some small fixes that have been forgotten.
David Carrillo-Cisneros (3):
perf tool cgroup: Initialize cgroup refcnt with refcount_set
perf tools: Add EXCLUDE_EXTLIBS and EXTRA_PERFLIBS to makefile
perf annotate: Process tracing data in pipe mode
Sudeep Holla (1):
tools: perf: Fix
free sleep 2 | perf annotate -D --stdio
...
0x78 [0xc]: PERF_RECORD_TRACING_DATA: unhandled!
...
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/builtin-annotate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 52
-e cycles -C 0 -G /
Performance counter stats for 'CPU(s) 0':
17,516,664 cycles /
Signed-off-by: David Carrillo-Cisneros
Change-Id: I8f00f61aaecce876e7df448bd7f850b20db13ef1
---
tools/perf/util/cgroup.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
d. So
this patch fixes the linker error by getting rid of unwanted libraries
in the linker stage.
Fixes: 209045adc2bb ("perf tools: add JVMTI agent library")
Acked-by: Jiri Olsa
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Stephane Eranian
Signed-off-by: Sudeep Holla
Acked-by: Dav
On Wed, Jul 12, 2017 at 7:31 AM, Jiri Olsa wrote:
> On Tue, Jul 11, 2017 at 04:52:51PM -0700, David Carrillo-Cisneros wrote:
>> v5: - Fix buffer leaking and size changes in
>> perf_event__synthesize_features.
>> - Remove unnecessary renaming.
>>
On Tue, Jul 11, 2017 at 6:39 PM, David Ahern wrote:
> On 7/11/17 5:52 PM, David Carrillo-Cisneros wrote:
> ...
>> (This is a rebased and updated version of Stephane Eranian's version
>> in https://patchwork.kernel.org/patch/1499081/)
>
> ...
>> With
On Wed, Jul 12, 2017 at 12:38 AM, Jiri Olsa wrote:
> On Tue, Jul 11, 2017 at 05:32:40PM -0700, David Carrillo-Cisneros wrote:
>> On Tue, Jun 13, 2017 at 11:54 AM, Jiri Olsa wrote:
>> > On Mon, Jun 12, 2017 at 09:29:31PM -0700, David Carrillo-Cisneros wrote:
>> >
>&
Do not proceed if write_padded error failed.
Also, add comments to remind that the return value of write_*
functions in util/header.c is an erro code and not the number
of bytes written.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 6 +-
1 file changed, 5
ter with
constant buf argument.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/util.c | 6 --
tools/perf/util/util.h | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 9e4ea852f636..4c360daa4e24 100644
--- a/tool
Now that writen takes a const buffer, use it in do_write instead
of duplicating its functionality.
Export do_write to use it consistently in header.c and
build_id.c .
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/build-id.c | 2 +-
tools/perf/util/header.c | 14
Introduce struct feat_fd. This patch uses it as a wrapper
around fd in write_* functions for feature headers. Next
patches will extend its functionality to other feature
header functions.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/build-id.c
Most callers of readn in perf header read either a 32 or a 64 bits
number, error check it and swap it, if necessary.
Create do_read_u32 and do_read_u64 to simplify these use cases.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 210
er on, the same variables can
be reused for pipe-mode.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 58
1 file changed, 24 insertions(+), 34 deletions(-)
diff --git a/tools/perf
As preparation for using header records in pipe-mode, replace
int fd with struct feat_fd ff in process functions for all header
record types.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 164
In pipe-mode, we will operate over a buffer instead of a file descriptor
but write_pmu_mappings uses lseek to move over the perf.data file.
Refactor write_pmu_mappings to avoid the usage of lseek and allow
reusing the same logic in pipe-mode (next patch).
Signed-off-by: David Carrillo-Cisneros
= 33, uncore_ha_0 = 16, uncore_cbox
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB - ]
...
Support added for the subcommands: report, inject, annotate and script.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/Documentation/perf.data-file-forma
As preparation for using header records in-pipe mode, replace
int fd with struct feat_fd ff in read functions for all header
record types.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 101
be NULLed individually.
This allows to define two variations only:
- FEAT_OPR: synthesizes auxiliar event record.
- FEAT_OPN: doesn't synthesize an auxiliar event record.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 72 +---
ng if their
functions are called in pipe-mode.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 75
1 file changed, 70 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index d5359e3
As preparation for using header records in pipe mode, replace
int fd with struct feat_fd ff in print functions for all header
record types.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 102 ++-
1 file changed, 47 insertions
, uncore_ha_1 = 15, uncore_ubox = 25
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB (null) ]
Prior to this patch, event was not printed.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 19 +--
1 file changed, 17
Add show_feat_hdr to control level of printed information
of feature headers.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/builtin-report.c | 4
tools/perf/builtin-script.c | 3 +++
tools/perf/util/tool.h | 7 +++
3 files changed, 14 insertions(+)
diff --git a/tools/perf
Simplify code by adding a macro to handle the common case
of processing header features that are a simple string.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 65 +---
1 file changed, 17 insertions(+), 48 deletions(-)
diff
lay
# pmu mappings: intel_bts = 6, cpu = 4, msr = 49, uncore_cbox_10 = 36, [SNIP]
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB - ]
...
Only patches 14 to 16 affect user observed behavior. All other are
preparatory changes or bug fixes.
David C
commit 801bc8193463 ("perf probe: Allow placing uprobes in
alternate namespaces.") did not add the new struct nsinfo argument to
show_line_range for the case where HAVE_DWARF_SUPPORT is undefined,
giving a compilation error when dwarf is not available. Fix it.
Signed-off-by: Davi
On Tue, Jun 13, 2017 at 11:54 AM, Jiri Olsa wrote:
> On Mon, Jun 12, 2017 at 09:29:31PM -0700, David Carrillo-Cisneros wrote:
>
> SNIP
>
>>
>> void perf_event__print_totals(void);
>> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
>> ind
Most callers of readn in perf header read either a 32 or a 64 bits
number, error check it and swap it, if necessary.
Create do_read_u32 and do_read_u64 to simplify these use cases.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 210
ter with
constant buf argument.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/util.c | 6 --
tools/perf/util/util.h | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 28c9f335006c..0d8d7b8b2949 100644
--- a/tool
As preparation for using header records in pipe mode, replace
int fd with struct feat_fd ff in print functions for all header
record types.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 102 ++-
1 file changed, 47 insertions
Simplify code by adding a macro to handle the common case
of processing header features that are a simple string.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 65 +---
1 file changed, 17 insertions(+), 48 deletions(-)
diff
er on, the same variables can
be reused for pipe-mode.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 56
1 file changed, 23 insertions(+), 33 deletions(-)
diff --git a/tools/perf
As preparation for using header records in pipe-mode, replace
int fd with struct feat_fd ff in process functions for all header
record types.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 164
Now that writen takes a const buffer, use it in do_write instead
of duplicating its functionality.
Export do_write to use it consistently in header.c and
build_id.c .
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/build-id.c | 2 +-
tools/perf/util/header.c | 14
Introduce struct feat_fd. This patch uses it as a wrapper
around fd in write_* functions for feature headers. Next
patches will extend its functionality to other feature
header functions.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/build-id.c
As preparation for using header records in-pipe mode, replace
int fd with struct feat_fd ff in read functions for all header
record types.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 101
Do not proceed if write_padded error failed.
Also, add comments to remind that the return value of write_*
functions in util/header.c is an erro code and not the number
of bytes written.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 6 +-
1 file changed, 5
In pipe-mode, we will operate over a buffer instead of a file descriptor
but write_pmu_mappings uses lseek to move over the perf.data file.
Refactor write_pmu_mappings to avoid the usage of lseek and allow
reusing the same logic in pipe-mode (next patch).
Signed-off-by: David Carrillo-Cisneros
[SNIP]
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB - ]
...
Only patches 14 to 16 have a significant effect in user observed behavior.
All other are transparent preparatory changes or bug fixes.
David Carrillo-Cisneros (16):
perf header: encap
On Wed, Jun 14, 2017 at 12:20 AM, Jiri Olsa wrote:
> On Tue, Jun 13, 2017 at 11:51:43PM -0700, David Carrillo-Cisneros wrote:
>> On Tue, Jun 13, 2017 at 11:55 AM, Jiri Olsa wrote:
>> > On Mon, Jun 12, 2017 at 09:29:16PM -0700, David Carrillo-Cisneros wrote:
>> >> v4
On Tue, Jun 13, 2017 at 11:55 AM, Jiri Olsa wrote:
> On Mon, Jun 12, 2017 at 09:29:16PM -0700, David Carrillo-Cisneros wrote:
>> v4: - Limit write_* functions to page_size.
>> - Fixed bugs spotted by Jiri.
>> - Add information about pipe-mode to some error messages
On Tue, Jun 13, 2017 at 11:54 AM, Jiri Olsa wrote:
> On Mon, Jun 12, 2017 at 09:29:16PM -0700, David Carrillo-Cisneros wrote:
>> v4: - Limit write_* functions to page_size.
>> - Fixed bugs spotted by Jiri.
>> - Add information about pipe-mode to some error messages.
&
On Tue, Jun 13, 2017 at 11:54 AM, Jiri Olsa wrote:
> On Mon, Jun 12, 2017 at 09:29:28PM -0700, David Carrillo-Cisneros wrote:
>
> SNIP
>
>> /* Return: 0 if succeded, -ERR if failed. */
>> int write_padded(struct feat_fd *ff, const void *bf,
>>size
On Tue, Jun 13, 2017 at 11:54 AM, Jiri Olsa wrote:
> On Mon, Jun 12, 2017 at 09:29:25PM -0700, David Carrillo-Cisneros wrote:
>
> SNIP
>
>> struct cpu_cache_level *caches;
>> u32 cnt, i, version;
>> @@ -2084,8 +2073,7 @@ static int process_cache(struct
Most callers of readn in perf header read either a 32 or a 64 bits
number, error check it and swap it, if necessary.
Create do_read_u32 and do_read_u64 to simplify these use cases.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 210
Do not proceed if write_padded error failed.
Also, add comments to remind that the return value of write_*
functions in util/header.c is an erro code and not the number
of bytes written.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 6 +-
1 file changed, 5
n user observed behavior.
All other are transparent preparatory changes or bug fixes.
David Carrillo-Cisneros (16):
perf header: encapsulate read and swap
perf header: add PROCESS_STR_FUN macro
perf header: fail on write_padded error
perf util: add const modifier to buf in "writen&quo
ter with
constant buf argument.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/util.c | 6 --
tools/perf/util/util.h | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 28c9f335006c..0d8d7b8b2949 100644
--- a/tool
Introduce struct feat_fd. This patch uses it as a wrapper
around fd in write_* functions for feature headers. Next
patches will extend its functionality to other feature
header functions.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/build-id.c
As preparation for using header records in pipe mode, replace
int fd with struct feat_fd ff in print functions for all header
record types.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 102 ++-
1 file changed, 47 insertions
In pipe-mode, we will operate over a buffer instead of a file descriptor
but write_pmu_mappings uses lseek to move over the perf.data file.
Refactor write_pmu_mappings to avoid the usage of lseek and allow
reusing the same logic in pipe-mode (next patch).
Signed-off-by: David Carrillo-Cisneros
As preparation for using header records in pipe-mode, replace
int fd with struct feat_fd ff in process functions for all header
record types.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 164
be NULLed individually.
This allows to define two variations only:
- FEAT_OPR: synthesizes auxiliar event record.
- FEAT_OPN: doesn't synthesize an auxiliar event record.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 72 +---
, uncore_ha_1 = 15, uncore_ubox = 25
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB (null) ]
Prior to this patch, event was not printed.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 19 +--
1 file changed, 17
er on, the same variables can
be reused for pipe-mode.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 58
1 file changed, 24 insertions(+), 34 deletions(-)
diff --git a/tools/perf
Add show_feat_hdr to control level of printed information
of feature headers.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/builtin-report.c | 11 ---
tools/perf/builtin-script.c | 3 +++
tools/perf/util/tool.h | 7 +++
3 files changed, 18 insertions(+), 3 deletions
ng if their
functions are called in pipe-mode.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 73 ++--
1 file changed, 65 insertions(+), 8 deletions(-)
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index deb0234
= 33, uncore_ha_0 = 16, uncore_cbox
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB - ]
...
Support added for the subcommands: report, inject, annotate and script.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/Documentation/perf.data-file-forma
As preparation for using header records in-pipe mode, replace
int fd with struct feat_fd ff in read functions for all header
record types.
This patch does not change behavior.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 101
Now that writen takes a const buffer, use it in do_write instead
of duplicating its functionality.
Export do_write to use it consistently in header.c and
build_id.c .
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/build-id.c | 2 +-
tools/perf/util/header.c | 14
Simplify code by adding a macro to handle the common case
of processing header features that are a simple string.
Signed-off-by: David Carrillo-Cisneros
---
tools/perf/util/header.c | 65 +---
1 file changed, 17 insertions(+), 48 deletions(-)
diff
On Wed, Jun 7, 2017 at 8:02 AM, David Carrillo-Cisneros
wrote:
> On Wed, Jun 7, 2017 at 4:19 AM, Jiri Olsa wrote:
>> On Tue, Jun 06, 2017 at 11:15:25AM -0700, David Carrillo-Cisneros wrote:
>>> On Tue, Jun 6, 2017 at 5:35 AM, Jiri Olsa wrote:
>>> > On Tue, Ju
On Thu, Jun 8, 2017 at 4:54 AM, Jiri Olsa wrote:
> On Tue, Jun 06, 2017 at 12:07:22AM -0700, David Carrillo-Cisneros wrote:
>
> SNIP
>
>> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
>> index 6c1963e5bf10..c91acd5b0838 100644
>> --- a/tools/per
Good catch. The logic hasnt broken, this change is wrong. Fixed in next version.
On Thu, Jun 8, 2017 at 4:54 AM, Jiri Olsa wrote:
> On Tue, Jun 06, 2017 at 12:07:15AM -0700, David Carrillo-Cisneros wrote:
>
> SNIP
>
>> +static int process_cpu_topology(struct feat_
1 - 100 of 459 matches
Mail list logo