This adds a feature to export perf data to JSON. It uses a minimal
inline JSON encoding, no external dependencies. Currently it only
outputs some headers and sample metadata but it's easily extensible.
Use it like this:
perf data convert --to-json out.json
Signed-off-by: Nicholas F
Hi Jiri,
Thanks again for the review. I've fixed the issues you mentioned. Some notes
below:
On 2021-04-01 8:15 a.m., Jiri Olsa wrote:
> I recall you did not add support for walltime clock,
> don't you need it to sync with other events?
Not necessarily. As long as the perf recording and the GPU
>From ddcfd620e7cad4100d0076090c4b39dba8aeead3 Mon Sep 17 00:00:00 2001
From: Nicholas Fraser
Date: Wed, 31 Mar 2021 06:10:00 -0400
Subject: [PATCH] perf data: Add JSON export
This adds a feature to export perf data to JSON. It uses a minimal
inline JSON encoding, no external dependenc
Hi Jiri,
Thanks for the review. I've addressed your suggestions; some notes are
below. I'll send a new patch.
On 2021-03-24 2:20 p.m., Jiri Olsa wrote:
> On Wed, Mar 24, 2021 at 09:06:50AM -0400, Nicholas Fraser wrote:
>> [...] We use this to import the data into a tool
Hi Arnaldo,
Thanks for the review. I'll send a replacement patch with your suggestions.
On 2021-03-24 9:30 a.m., Arnaldo Carvalho de Melo wrote:
> Do you plan to output the headers too? I think we should, for
> completeness.
I've added the headers, at least the ones that seemed important or easy
uot;dso": "libc-2.33.so"
},
{
"ip": "0x7f1e0de0b71c",
"symbol": "__wcsmbs_load_conv",
>From 9fd0b3889f00ad13662879767d833309d8a035b6 Mon Sep 17 00:00:00 2001
From: Nicholas Fraser
Date: Thu, 18 Feb 2021 13:24:03 -0500
Subject: [PATCH] perf buildid-cache: Add test for PE executable
This builds on the previous changes to tests/shell/buildid.sh, adding
tests for a PE file. It a
On 2021-02-24 8:43 a.m., Jiri Olsa wrote:
> On Fri, Feb 19, 2021 at 11:10:34AM -0500, Nicholas Fraser wrote:
>> +# the build id must be rearranged into a GUID
>> +id=`objcopy -O binary --only-section=.buildid $1 /dev/stdout | \
>> +
an the sed
command and anyway it's bash-specific. This uses a hardcoded .exe so we
could also just hardcode its GUID but I'd worry about making the tests
too inflexible.)
Signed-off-by: Nicholas Fraser
---
tools/perf/tests/shell/buildid.sh | 43 +++
1 file ch
rf buildid-list" never reports an all-zero hash anymore.
This fixes "perf-archive" to skip missing build-ids by skipping lines
that start with a padding space rather than with zeroes.
Signed-off-by: Nicholas Fraser
---
tools/perf/perf-archive.sh | 3 +--
1 file changed, 1 insertion(
On 2021-02-18 2:39 p.m., Arnaldo Carvalho de Melo wrote:
> you forgot the:
>
> Signed-off-by: Nicholas Fraser
>
> I'm adding it, ok?
Ah yes sorry about that, to be explicit here it is:
Signed-off-by: Nicholas Fraser
>
> I'm also addressing Jiri
an the sed
command and anyway it's bash-specific. This uses a hardcoded .exe so we
could also just hardcode its GUID but I'd worry about making the tests
too inflexible.)
Signed-off-by: Nicholas Fraser
---
tools/perf/tests/shell/buildid.sh | 43 +++
1 file ch
This adds
a test for it.
Signed-off-by: Nicholas Fraser
---
tools/perf/tests/shell/buildid.sh | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/tests/shell/buildid.sh
b/tools/perf/tests/shell/buildid.sh
index 4861a20edee2..de02a23b7c7b 100755
--- a/tools/perf/tests/shell/
This removes the redundant checks bfd_check_format() and
bfd_target_elf_flavour. They were previously checking different files.
Signed-off-by: Nicholas Fraser
---
tools/perf/util/symbol.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util
Sorry, I just realized I forgot to run checkpatch.pl on these; they're
missing the --signoff. I'll re-send.
On 2021-02-16 3:38 p.m., Nicholas Fraser wrote:
> tests/shell/buildid.sh added an ELF executable with an MD5 build-id to
> the perf debug cache but did not check whethe
tests/shell/buildid.sh added an ELF executable with an MD5 build-id to
the perf debug cache but did not check whether the object was printed
by a subsequent call to "perf buildid-cache -l". It was being omitted
from the list.
A previous commit fixed the bug that left it out of the list. This adds
This removes the redundant checks bfd_check_format() and
bfd_target_elf_flavour. They were previously checking different files.
---
tools/perf/util/symbol.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 492c873713cc..08f6f57c8
stalled but it would take some
pretty large changes to the script.
Nick
On 2021-02-15 9:31 a.m., Jiri Olsa wrote:
> On Wed, Feb 10, 2021 at 02:17:25PM -0500, Nicholas Fraser wrote:
>> lsdir_bid_tail_filter() ignored any build-id that wasn't exactly 20
>> bytes. This worked onl
Oops, you are correct; it is doing these checks twice. Not sure how I missed
that. I'll send another patch to fix it.
Nick
On 2021-02-15 9:36 a.m., Jiri Olsa wrote:
> On Wed, Feb 10, 2021 at 02:17:38PM -0500, Nicholas Fraser wrote:
>> dso__load_bfd_symbols() attempts to loa
:29 a.m., Arnaldo Carvalho de Melo wrote:
> Em Wed, Feb 10, 2021 at 02:17:49PM -0500, Nicholas Fraser escreveu:
>> A non-existent build-id used to be treated as all-zero SHA-1 hash.
>> Build-ids are now variable width. A non-existent build-id is an empty
>> string and &quo
file ends up being used.
Nick
On 2021-02-12 7:28 a.m., Arnaldo Carvalho de Melo wrote:
> Em Wed, Feb 10, 2021 at 02:17:38PM -0500, Nicholas Fraser escreveu:
>> dso__load_bfd_symbols() attempts to load a DSO at its original path,
>> then closes it and loads the file in the
ve tried to make the minimal amount of changes to
allow 16-byte build-ids to work with a debugcache from a perf archive.
I'm new to kernel development so I apologize if I'm doing this incorrectly.
Thanks,
Nick
Nicholas Fraser (4):
perf buildid-cache: Don't skip 16-byte build
cache has been transferred to another machine via "perf
archive".
This fix makes it only load the file in the debug cache.
Signed-off-by: Nicholas Fraser
---
tools/perf/util/symbol.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/tools/perf/util/symbol.c b/
dso__load() to return 0 when successfully loading a DSO with
libbfd.
Signed-off-by: Nicholas Fraser
---
tools/perf/util/symbol.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index aa9ae875b995..492c873713cc 100644
--- a
igned-off-by: Nicholas Fraser
---
tools/perf/util/build-id.c | 5 +++--
tools/perf/util/build-id.h | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 02df36b30ac5..e32e8f2ff3bd 100644
--- a/tools/perf/util/build
with a padding space rather than with zeroes.
Signed-off-by: Nicholas Fraser
---
tools/perf/perf-archive.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/perf-archive.sh b/tools/perf/perf-archive.sh
index 0cfb3e2cefef..133f0eddbcc4 100644
--- a/tools/perf/perf-ar
26 matches
Mail list logo