sed to the current upstream (hope I did it right). It adds an option
to copy events when they are pushed to the samples queue.
- 2/2 enables the copying for perf kvm stat live.
Looks like we have to live with possibility to get thousands malloc()s/free()s
per second...
Alexander Yarygin (2):
perf se
finished_round() is invoked, queued events can be
overwritten by the kernel, so the finished_round() occurs on potentially
corrupted memory.
Let's copy events when queueing.
Signed-off-by: Alexander Yarygin
Cc: Arnaldo Carvalho de Melo
Cc: Christian Borntraeger
Cc: David Ahern
Cc: Ingo Molnar
Cc:
Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Stephane Eranian
Signed-off-by: Alexander Yarygin
---
tools/perf/util/ordered-events.c | 12 +---
tools/perf/util/ordered-events.h | 2 +-
tools/perf/util/session.c| 12 +
David Ahern writes:
> On 9/18/14, 2:21 PM, David Ahern wrote:
>> On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote:
>>> If nobody objects I'll merge this patch, as it fixes problems, but I
>>> wonder if the best wouldn't be simply not calling
>>> perf_evlist__mmap_consume() till the last event
David Ahern writes:
> On 9/19/14, 2:48 AM, Alexander Yarygin wrote:
>> It did't work. Turned out that there is at least one event alive after
>> finished_round(), usually I get more - ~20. Not sure why, maybe it's
>> another problem which sho
ost and on exit, if it's turned out
unprocessed.
Signed-off-by: Alexander Yarygin
Cc: Arnaldo Carvalho de Melo
Cc: Christian Borntraeger
Cc: David Ahern
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
---
tools/perf/
David Ahern writes:
> On 9/12/14, 10:27 AM, Alexander Yarygin wrote:
>> During mmap() process 'perf kvm stat live' gets a pointer to events and
>> passes them to the session queue. Events are stored in shared memory and
>> eventually they will be overwritten by t
is patch adds an extra rule to event_legacy_tracepoint which handles
those cases. Without the patch, perf will not accept such tracepoints in
the -e option.
Signed-off-by: Alexander Yarygin
---
tools/perf/util/parse-events.y | 12
1 file changed, 12 insertions(+)
diff --git a/to
Patch 2/3 makes possible to add arch specific tests
to perf/tests/parse-events.c.
Alexander Yarygin (3):
perf tools: parse tracepooints with '-' in system name
perf-test: add numeric identifier to evlist_test
perf-test: Add a test of kvm-390: trace event
tools/perf/tests/p
Add a s390 specific test of a hardcoded trace event with '-'
in the name.
Signed-off-by: Alexander Yarygin
---
tools/perf/tests/parse-events.c |7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 81dbd5
removes explicit numbering of array elements. This helps
to number tests with gaps.
Signed-off-by: Alexander Yarygin
---
tools/perf/tests/parse-events.c | 135 ++-
1 file changed, 90 insertions(+), 45 deletions(-)
diff --git a/tools/perf/tests/parse-events.c b/to
kvm stat support is currently conditional on i386/x86_64. Let's
abstract this into a HAVE_KVM_STAT_SUPPORT flag, so that other
architectures can support kvm stat as well.
Signed-off-by: Alexander Yarygin
Reviewed-by: Cornelia Huck
Reviewed-by: David Ahern
---
tools/perf/arch/x86/Mak
th 'end of sequence' marker can simplify
get_exit_reason() function.
Also patch introduces a define_exit_reasons_table, which makes easier to
define new tables.
Signed-off-by: Alexander Yarygin
Reviewed-by: Cornelia Huck
Reviewed-by: David Ahern
---
tools/perf/builtin-kvm.c | 27 ++
merge.
Thanks.
Alexander Yarygin (4):
perf kvm: Introduce HAVE_KVM_STAT_SUPPORT flag
perf kvm: Simplify of exit reasons tables definitions
perf kvm: Refactoring of cpu_isa_config()
perf: Allow to use cpuinfo on s390
tools/perf/arch/s390/Makefile |1 +
tools/perf/arch/s390/util/h
ff-by: Alexander Yarygin
Reviewed-by: Cornelia Huck
Reviewed-by: David Ahern
---
tools/perf/builtin-kvm.c | 39 +++
1 file changed, 23 insertions(+), 16 deletions(-)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 75f3544..41dbeaf 1
This patch defines CPUINFO_PROC for s390 and implements get_cpuid().
Signed-off-by: Alexander Yarygin
Reviewed-by: Cornelia Huck
Reviewed-by: David Ahern
---
tools/perf/arch/s390/Makefile |1 +
tools/perf/arch/s390/util/header.c | 28
tools/perf/perf
event,
- length of exit reasons strings,
- vcpu_id field name in kvm trace events,
and replace literals in perf-kvm.
Signed-off-by: Alexander Yarygin
Reviewed-by: Cornelia Huck
---
arch/x86/include/uapi/asm/Kbuild |1 +
arch/x86/include/uapi/asm/kvm_perf.h | 16
tools
om generic code.
Since the several global arrays (i.e. 'kvm_events_tp') have been moved
to arch/*, we can not know their sizes and use them directly in
builtin-kvm.c. This patch fixes that problem by adding trimming
NULL element to each array and changing the behavior of their handle
patch set based on linux-3.16-rc1 including patches in
"perf kvm: refactoring and small changes".
Link to the "perf kvm: refactoring and small changes" patch series:
https://lkml.org/lkml/2014/7/3/461
Link to the previous thread: https://lkml.org/lkml/2014/4/25/331
Alexander
ction checking against that array.
Signed-off-by: Alexander Yarygin
Reviewed-by: Cornelia Huck
---
tools/perf/arch/x86/util/kvm-stat.c |5 +
tools/perf/builtin-kvm.c| 13 -
tools/perf/util/kvm-stat.h |1 +
3 files changed, 18 insertions(+), 1 del
'perf kvm stat record', 'report' and 'live' are supported.
Signed-off-by: Alexander Yarygin
---
arch/s390/include/uapi/asm/Kbuild |1 +
arch/s390/include/uapi/asm/kvm_perf.h | 25
tools/perf/Documentation/perf-kvm.txt | 10 ++--
tools/perf/MAN
At Thu, 3 Jul 2014 18:29:07 +0400,
Alexander Yarygin wrote:
>
...
> diff --git a/tools/perf/Documentation/perf-kvm.txt
> b/tools/perf/Documentation/perf-kvm.txt
> index 52276a6..abf2925 100644
> --- a/tools/perf/Documentation/perf-kvm.txt
> +++ b/tools/perf/Document
perf stat can block pthread_create() for a multithreaded userspace
process (i.e. qemu) when:
- process is running with non-root privileges
- perf stat is running as root with trace events in -e option
- it is attached to the process's pid.
Here is a simple test scenario:
~$ cat test.c
#include
#
At Thu, 17 Apr 2014 13:32:21 +0200,
Jiri Olsa wrote:
>
> On Tue, Mar 25, 2014 at 11:15:29AM +0100, Paolo Bonzini wrote:
> > Il 24/03/2014 21:49, Christian Borntraeger ha scritto:
> > > event_legacy_tracepoint:
> > >+PE_NAME '-' PE_NAME ':' PE_NAME
> > >+{
> > >+ struct parse_events_evlist *data =
events, thus could end up with
> wrong permission check result.
>
> Reported-by: Alexander Yarygin
> Cc: Alexander Yarygin
> Cc: Arnaldo Carvalho de Melo
> Cc: Corey Ashford
> Cc: Frederic Weisbecker
> Cc: Ingo Molnar
> Cc: Paul Mackerras
> Cc: Peter Zijlstra
>
an print complete target info for 'stat report':
$ sudo perf kvm stat report -p 1
Analyze events for pid(s) 1, all VCPUs: [..]
Cc: Arnaldo Carvalho de Melo
Cc: Christian Borntraeger
Cc: David Ahern
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zi
David Ahern writes:
> On 8/28/14, 10:17 AM, Alexander Yarygin wrote:
>> The print_vcpu_info() function prints title line "Analyze events ..."
>> with a description of the current target. For 'live' option, the
>> output includes "system-wide/specif
#x27;live' command and patch 3 reuses
'live' specific code to print desirable information.
v2 changes:
- Split the big patch into 3 small patches
- Simplified the way to enable target.system_wide flag
Thanks.
Alexander Yarygin (3):
perf kvm stat report: Save pid string
x27;report' and 'live' commands.
Cc: Arnaldo Carvalho de Melo
Cc: Christian Borntraeger
Cc: David Ahern
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Signed-off-by: Alexander Yarygin
---
tools/perf/builtin-kvm.c |3 +++
1 file changed, 3 insertion
: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Signed-off-by: Alexander Yarygin
---
tools/perf/builtin-kvm.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index b7fa0bc..c3af7ee 100644
--- a/tools/
eter Zijlstra
Signed-off-by: Alexander Yarygin
---
tools/perf/builtin-kvm.c |6 +++---
tools/perf/util/kvm-stat.h |1 -
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 43367eb..ad73476 100644
--- a/tools/perf/buil
age for the 'perf record'
command. There are a few options useful for 'perf kvm stat record', the
rest either break kvm related output or don't change it.
Let's print safe for 'perf kvm stat record' options in addition to
general 'perf record' --help ou
'perf record':
perf kvm stat record --i-want-help-from-record
Error: unknown option `i-want-help-from-record'
usage: perf record [] []
or: perf record [] -- []
.. snip ..
Any ideas?
Thanks.
Alexander Yarygin (1):
perf kvm stat record: print kvm specific --h
ting measurement after
> program start
> -u, --uid user to profile
> --per-thread use per-thread mmaps
>
> $ perf kvm stat record -n sleep 1
> Error: switch `n' is not usable
>
>usage: perf kvm stat record []
>
> Cc: Alexander Y
4/9/18/353
Thanks!
Alexander Yarygin (2):
perf tools: Add option to copy events when queueing
perf kvm stat live: Enable events copying
tools/perf/builtin-kvm.c | 1 +
tools/perf/util/ordered-events.c | 41
tools/perf/util/ordered-eve
finished_round() is invoked, queued events can be
overwritten by the kernel, so the finished_round() occurs on potentially
corrupted memory.
Since there is no place where the event can be safely consumed,
let's copy events when queueing.
Signed-off-by: Alexander Yarygin
Cc: Arnaldo Carvalho de Mel
Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Stephane Eranian
Signed-off-by: Alexander Yarygin
---
tools/perf/util/ordered-events.c | 41
tools/perf/util/ordered-events.h | 10 +-
tools
Jiri Olsa writes:
[..]
>
> looks ok.. but I was wondering if we could move those repeating
> bits in function.. something like below (untested, just compiled)
>
> thanks,
> jirka
>
>
[..]
Yep, it's better. Just checked - it works. How should we process?
Thanks.
--
To unsubscribe from this li
finished_round() is invoked, queued events can be
overwritten by the kernel, so the finished_round() occurs on potentially
corrupted memory.
Since there is no place where the event can be safely consumed,
let's copy events when queueing.
Signed-off-by: Alexander Yarygin
Cc: Arnaldo Carvalho de Mel
size limit
Alexander Yarygin (2):
perf tools: Add option to copy events when queueing
perf kvm stat live: Enable events copying
tools/perf/builtin-kvm.c | 1 +
tools/perf/util/ordered-events.c | 49
tools/perf/util/ordered-events.h | 10 +++-
of context switching -- e.g., running
'perf bench sched pipe'.
This patch offers live commands an option to copy the event when it is placed in
the ordered samples queue.
Based on a patch from David Ahern
Signed-off-by: Alexander Yarygin
Cc: Arnaldo Carvalho de Melo
Cc: Christian Bornt
Ingo Molnar writes:
> * Jiri Olsa wrote:
>
>> On Fri, Oct 03, 2014 at 06:34:21AM +0200, Ingo Molnar wrote:
>> >
>> > * Alexander Yarygin wrote:
>> >
[..]
>> >
>> > What's the performance effect of this - i.e. by
- events alocations are under the report.queue-size limit
Alexander Yarygin (2):
perf tools: Add option to copy events when queueing
perf kvm stat live: Enable events copying
tools/perf/builtin-kvm.c | 1 +
tools/perf/util/ordered-events.c | 49
finished_round() is invoked, queued events can be
overwritten by the kernel, so the finished_round() occurs on potentially
corrupted memory.
Since there is no place where the event can be safely consumed,
let's copy events when queueing.
Signed-off-by: Alexander Yarygin
Cc: Arnaldo Carvalho de Mel
of context switching -- e.g., running
'perf bench sched pipe'.
This patch offers live commands an option to copy the event when it is placed in
the ordered samples queue.
Based on a patch from David Ahern
Acked-by: Jiri Olsa
Signed-off-by: Alexander Yarygin
Cc: Arnaldo Carvalho de
s extern.
But if people are strongly against it, as an alternative I can suggest
to move the 'char *decode' variable to the perf_kvm_stat structure,
allocate it once e.g. in kvm_events_report() and just write to it via
decode_key(). If I'm not mistaken, we always write \0 trimmed stri
Hemant Kumar writes:
> Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic
> discovery of kvm events (if its needed). To do this, some extern
> variables have been introduced with which we can keep the generic
> functions generic.
>
> Signed-off-by: Hemant Kumar
> ---
> Chang
Commit-ID: 54c801ff71ba9c9ae41871e226b9d846ff9c6bab
Gitweb: http://git.kernel.org/tip/54c801ff71ba9c9ae41871e226b9d846ff9c6bab
Author: Alexander Yarygin
AuthorDate: Thu, 3 Jul 2014 18:29:06 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 16 Jul 2014 17:57:32 -0300
perf kvm
Commit-ID: 3be8e2a0a53c3179a44a933614f6a893da0b5c19
Gitweb: http://git.kernel.org/tip/3be8e2a0a53c3179a44a933614f6a893da0b5c19
Author: Alexander Yarygin
AuthorDate: Thu, 3 Jul 2014 18:29:07 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 16 Jul 2014 17:57:33 -0300
perf kvm
Commit-ID: 44b3802122174ba499613bac3aab2e66e948ce1e
Gitweb: http://git.kernel.org/tip/44b3802122174ba499613bac3aab2e66e948ce1e
Author: Alexander Yarygin
AuthorDate: Thu, 3 Jul 2014 18:29:04 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 16 Jul 2014 17:57:32 -0300
perf kvm
Commit-ID: 9daa81239e60c162153fb2a365b8492c9a9bf632
Gitweb: http://git.kernel.org/tip/9daa81239e60c162153fb2a365b8492c9a9bf632
Author: Alexander Yarygin
AuthorDate: Thu, 3 Jul 2014 18:29:05 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 16 Jul 2014 17:57:32 -0300
perf kvm
Commit-ID: 3ae4a76ac840021294c091884e04af7c92e481ae
Gitweb: http://git.kernel.org/tip/3ae4a76ac840021294c091884e04af7c92e481ae
Author: Alexander Yarygin
AuthorDate: Mon, 1 Sep 2014 17:44:53 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 17 Sep 2014 17:08:07 -0300
perf kvm
Commit-ID: 1f3e5b55035549311e42c3f84007e6c799ed991f
Gitweb: http://git.kernel.org/tip/1f3e5b55035549311e42c3f84007e6c799ed991f
Author: Alexander Yarygin
AuthorDate: Mon, 1 Sep 2014 17:44:55 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 17 Sep 2014 17:08:08 -0300
perf kvm
Commit-ID: f181957c2849478fc963a8ac3c7dacf0a87c6b05
Gitweb: http://git.kernel.org/tip/f181957c2849478fc963a8ac3c7dacf0a87c6b05
Author: Alexander Yarygin
AuthorDate: Mon, 1 Sep 2014 17:44:54 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 17 Sep 2014 17:08:07 -0300
perf kvm
Commit-ID: 2b9032e0ecb57de819bcf40b440e7cbd2d8f3a8c
Gitweb: http://git.kernel.org/tip/2b9032e0ecb57de819bcf40b440e7cbd2d8f3a8c
Author: Alexander Yarygin
AuthorDate: Fri, 25 Apr 2014 17:34:05 +0200
Committer: Jiri Olsa
CommitDate: Tue, 29 Apr 2014 14:27:23 +0200
perf tools: Parse
Commit-ID: 615b8f99f755f8e2701f08cef9c56bd3033891a5
Gitweb: http://git.kernel.org/tip/615b8f99f755f8e2701f08cef9c56bd3033891a5
Author: Alexander Yarygin
AuthorDate: Fri, 25 Apr 2014 17:34:06 +0200
Committer: Jiri Olsa
CommitDate: Tue, 29 Apr 2014 14:29:48 +0200
perf tests: Add numeric
Commit-ID: c0bc8c6d4a2e18e54ef7854a86bc5a47a8e3d04e
Gitweb: http://git.kernel.org/tip/c0bc8c6d4a2e18e54ef7854a86bc5a47a8e3d04e
Author: Alexander Yarygin
AuthorDate: Fri, 25 Apr 2014 17:34:07 +0200
Committer: Jiri Olsa
CommitDate: Tue, 29 Apr 2014 14:30:43 +0200
perf tests: Add a test
Commit-ID: 65c647a65c155e69bd5765d5e454982566ac1c62
Gitweb: http://git.kernel.org/tip/65c647a65c155e69bd5765d5e454982566ac1c62
Author: Alexander Yarygin
AuthorDate: Thu, 3 Jul 2014 17:59:51 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 7 Jul 2014 16:55:24 -0300
perf kvm
Commit-ID: df74c13b6c53c97576652f7b2840764ad7d5f949
Gitweb: http://git.kernel.org/tip/df74c13b6c53c97576652f7b2840764ad7d5f949
Author: Alexander Yarygin
AuthorDate: Thu, 3 Jul 2014 17:59:50 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 7 Jul 2014 16:55:24 -0300
perf kvm
Commit-ID: f8d9ccde2be4c24bfb8787af36a59a981b00a02d
Gitweb: http://git.kernel.org/tip/f8d9ccde2be4c24bfb8787af36a59a981b00a02d
Author: Alexander Yarygin
AuthorDate: Thu, 3 Jul 2014 18:08:22 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 7 Jul 2014 16:55:24 -0300
perf tools
Commit-ID: da50ad69723111e0292f1943dad77b41bb9a25b0
Gitweb: http://git.kernel.org/tip/da50ad69723111e0292f1943dad77b41bb9a25b0
Author: Alexander Yarygin
AuthorDate: Thu, 3 Jul 2014 17:59:49 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 7 Jul 2014 16:55:23 -0300
perf kvm
Commit-ID: acb61fc8ed73eb477a9044272d7a1b1f5a572f91
Gitweb: http://git.kernel.org/tip/acb61fc8ed73eb477a9044272d7a1b1f5a572f91
Author: Alexander Yarygin
AuthorDate: Wed, 9 Apr 2014 16:21:59 +0200
Committer: Jiri Olsa
CommitDate: Sun, 20 Apr 2014 00:14:08 +0200
perf kvm: Fix 'Min
Commit-ID: 673d659f5c5918b7ddbafebf1f129c9eb82973b4
Gitweb: http://git.kernel.org/tip/673d659f5c5918b7ddbafebf1f129c9eb82973b4
Author: Alexander Yarygin
AuthorDate: Fri, 3 Oct 2014 18:40:12 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 15 Oct 2014 17:39:03 -0300
perf kvm
Commit-ID: 54bf53b1cb9150b894213a705c562d52388376ef
Gitweb: http://git.kernel.org/tip/54bf53b1cb9150b894213a705c562d52388376ef
Author: Alexander Yarygin
AuthorDate: Fri, 3 Oct 2014 18:40:11 +0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 15 Oct 2014 17:39:03 -0300
perf
Commit-ID: 99d348a84c2118ed04c9b72168787f55e2fe33a5
Gitweb: http://git.kernel.org/tip/99d348a84c2118ed04c9b72168787f55e2fe33a5
Author: Alexander Yarygin
AuthorDate: Wed, 10 Dec 2014 14:28:10 +0100
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 10 Dec 2014 12:08:59 -0300
perf kvm
65 matches
Mail list logo