Hi Arnaldo, Hi Jiri,
Kan's patch series for AlderLake perf core support has been upstreamed, so the interface will not be
changed any more.
For this perf tool series (v4), do you have any comments?
Thanks
Jin Yao
On 4/16/2021 10:04 PM, Jin Yao wrote:
AlderLake uses a hybrid archite
Add some words and examples to help understanding of
Intel hybrid perf support.
Signed-off-by: Jin Yao
---
v4:
- Update due to PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE
are extended to be PMU type aware.
tools/perf/Documentation/intel-hybrid.txt | 214 ++
tools/perf
Some events are not supported. Only pick up some cases for hybrid.
# ./perf test 67
67: Parse and process metrics : Ok
Signed-off-by: Jin Yao
---
tools/perf/tests/parse-metric.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff
Since for "cycles:u' on hybrid platform, it creates two "cycles".
So the second evsel in evlist also needs initialization.
With this patch,
# ./perf test 71
71: Convert perf time to TSC: Ok
Signed-off-by: Jin Yao
---
tools/per
8 cpu_core/instructions/
841,158,734 cpu_atom/instructions/
1.002644773 seconds time elapsed
Now there is no shadow stat 'insn per cycle' reported. We will support
it later and now just skip the 'perf stat metrics (shadow stat) test'.
Signed-off-by: J
Force to create one event "cpu_core/cycles/" by default,
otherwise in evlist__valid_sample_type, the checking of
'if (evlist->core.nr_entries == 1)' would be failed.
# ./perf test 41
41: Session topology : Ok
Signed-off-
: Ok
Signed-off-by: Jin Yao
---
tools/perf/tests/switch-tracking.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/switch-tracking.c
b/tools/perf/tests/switch-tracking.c
index 3ebaa758df77..3a12176f8c46 100644
--- a/tools/perf/tests
For hybrid, the attr.type consists of pmu type id + original type.
There will be much changes for this test. Now we temporarily
skip this test case and TODO in future.
Signed-off-by: Jin Yao
---
tools/perf/tests/attr.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/perf/tests
Add basic hybrid test cases for 'Parse event definition strings' test.
# perf test 6
6: Parse event definition strings : Ok
Signed-off-by: Jin Yao
---
tools/perf/tests/parse-events.c | 152
1 file changed, 152
d by 2.
# ./perf test 14
14: Roundtrip evsel->name : Ok
Signed-off-by: Jin Yao
---
tools/perf/tests/evsel-roundtrip-name.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/tools/perf/tests/evsel-roundtrip-
5,438,125 cpu_core/cycles/
3,914,586 cpu_atom/cycles/
1.004250966 seconds time elapsed
Signed-off-by: Jin Yao
---
v4:
- No change.
tools/perf/builtin-stat.c | 4 +++
tools/perf/util/evlist-hybrid.c| 47 ++
tools/perf/util/evlist-hybrid
'cpu_core/cycles/'
# Event count (approx.): 22043448
#
# Overhead Command Shared ObjectSymbol
# ...
#
...
Signed-off-by: Jin Yao
---
v4:
- No change.
tools/perf/builtin-rec
ats
need to be improved in future if we want to get the original shadow
stats.
Signed-off-by: Jin Yao
---
v4:
- No change.
tools/perf/builtin-stat.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 1255af4751c2..03
59,350 cpu_core/cycles/
S0-D0-C20 2 1,559,589 cpu_core/cycles/
S0-D0-C24 2163,924 cpu_core/cycles/
S0-D0-C28 2376,610 cpu_core/cycles/
1.003621290 seconds time elapsed
Signed-off-by: Jin Yao
---
v4:
- No
have to create evlist-hybrid.c otherwise due to the symbol
dependency the perf test python would be failed.
Signed-off-by: Jin Yao
---
v4:
- Use PERF_TYPE_HARDWARE (v3 uses PERF_TYPE_HARDWARE_PMU).
v3:
- Move the major code to new created evlist-hybrid.c.
tools/perf/builtin-record.c | 1
event creation. So next only the
event with the specified pmu would be created.
Signed-off-by: Jin Yao
---
v4:
- New in v4.
tools/perf/util/parse-events-hybrid.c | 21 -
tools/perf/util/parse-events-hybrid.h | 3 ++-
tools/perf/util/parse-events.c| 5 +++--
tools/perf
'system wide':
5,072,048 cpu_core/r3c/
1.001989415 seconds time elapsed
# perf stat -e cpu_core/r3c,name=EVENT/ -a -- sleep 1
Performance counter stats for 'system wide':
6,819,847 EVENT
1.001795630
2289965 seconds time elapsed
Signed-off-by: Jin Yao
---
v4:
- Directly return add_raw_hybrid().
v3:
- Raw event creation is moved to parse-events-hybrid.c.
tools/perf/util/parse-events-hybrid.c | 38 ++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/tools/
6,744,979 cpu_core/cycles/
1,965,552 cpu_atom/cycles/
1.001882711 seconds time elapsed
0x4 in 0x4 indicates the cpu_core pmu.
0x8 in 0x8 indicates the cpu_atom pmu.
Signed-off-by: Jin Yao
---
v4:
- Use PERF_TYPE_HARDWARE (v3 uses PERF_TYPE_HA
thon would be failed.
Signed-off-by: Jin Yao
---
v4:
- No change.
v3:
- Move perf_pmu__has_hybrid from pmu-hybrid.c to pmu.c. We have to
add pmu-hybrid.c to python-ext-sources to solve symbol dependency
issue found in perf test python. For perf_pmu__has_hybrid, it calls
perf_pmu__scan,
o:
"cpu_core/cycles/"
If user configs the name, we still use the user specified name.
Signed-off-by: Jin Yao
---
v4:
- If user configs the name, we still use the user specified name.
v3:
- No change.
tools/perf/builtin-stat.c | 4
tools/perf/util/evsel.h| 1 +
ormance counter stats for 'system wide':
24,793 cpu_core/LLC-loads/
17,255 cpu_atom/LLC-loads/
1.001970988 seconds time elapsed
0x4 in 0x40002 indicates the cpu_core pmu.
0x8 in 0x80002 indicates the cpu_atom pmu.
Signed-off-by
;perf_pmu__hybrid_pmus' and then next we just need
to iterate the list to get all hybrid pmu by using
perf_pmu__for_each_hybrid_pmu.
Signed-off-by: Jin Yao
---
v4:
- Check if 'cpus' file is empty. If so, don't create pmu.
v3:
- No functi
nt = "period=103,umask=0x80,event=0xd2",
.desc = "Counts the number of load ops retired that. Unit: cpu_atom ",
.topic = "cache",
.pmu = "cpu_atom",
},
But if without this patch, the "uncore_" prefix is added before &q
Simplify the arguments of __perf_pmu__new_alias() by passing
the whole 'struct pme_event' pointer.
Signed-off-by: Jin Yao
---
v4:
- No change.
tools/perf/util/pmu.c | 36
1 file changed, 16 insertions(+), 20 deletions(-)
diff --git a/tools/perf/
On hybrid platform, one event is available on one pmu
(such as, available on cpu_core or on cpu_atom).
This patch saves the pmu name to the pmu field of struct perf_pmu_alias.
Then next we can know the pmu which the event can be enabled on.
Signed-off-by: Jin Yao
---
v4:
- No change.
v3
ed.
Signed-off-by: Jin Yao
---
v4:
- Updated by Kan's latest patch,
'[PATCH V6 21/25] perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE'
include/uapi/linux/perf_event.h | 15 +++
tools/include/uapi/linux/perf_event.h | 15 +++
2 files changed
fy the arguments of __perf_pmu__new_alias() by passing
the 'struct pme_event' pointer.
- Check sysfs validity before access.
- Use pmu style event name, such as "cpu_core/cycles/".
- Move command output two chars to the right.
- Move pmu hybrid functions to new created pmu-hyb
Hi Jiri,
On 4/16/2021 3:39 AM, Jiri Olsa wrote:
On Thu, Apr 15, 2021 at 10:53:33PM +0800, Jin, Yao wrote:
SNIP
With my current code,
static int parse_events__with_hybrid_pmu(struct parse_events_state *parse_state,
const char *str, char *pmu_name
Hi Jiri,
On 4/15/2021 10:11 PM, Jiri Olsa wrote:
On Thu, Apr 15, 2021 at 09:36:16PM +0800, Jin, Yao wrote:
SNIP
+ int n = 0;
+
+ list_for_each(pos, list)
+ n++;
+
+ return n;
+}
+
+static int parse_events__with_hybrid_pmu(struct parse_events_state
Hi Jiri,
On 4/15/2021 7:03 PM, Jiri Olsa wrote:
On Mon, Mar 29, 2021 at 03:00:31PM +0800, Jin Yao wrote:
SNIP
---
v3:
- Rename the patch:
'perf parse-events: Support hardware events inside PMU' -->
'perf parse-events: Support no alias assigned event inside hybr
Hi Jiri,
On 4/9/2021 9:47 PM, Jiri Olsa wrote:
On Mon, Mar 29, 2021 at 03:00:31PM +0800, Jin Yao wrote:
SNIP
+ struct parse_events_state *parse_state)
{
struct perf_event_attr attr;
LIST_HEAD(config_terms);
@@ -521,7 +526,7 @@ int
Hi Jiri,
On 4/9/2021 9:48 PM, Jiri Olsa wrote:
On Mon, Mar 29, 2021 at 03:00:30PM +0800, Jin Yao wrote:
On hybrid platform, user may want to enable the hardware event
only on one PMU. So following syntax is supported:
cpu_core//
cpu_atom//
# perf stat -e cpu_core/cpu-cycles/ -a -- sleep 1
Hi Jiri,
On 4/9/2021 9:48 PM, Jiri Olsa wrote:
On Mon, Mar 29, 2021 at 03:00:28PM +0800, Jin Yao wrote:
SNIP
index 1bbd0ba92ba7..3692fa3c964a 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -458,6 +458,7 @@ int parse_events_add_cache(struct list_head *list
Hi Jiri,
On 4/9/2021 9:49 PM, Jiri Olsa wrote:
On Mon, Mar 29, 2021 at 03:00:29PM +0800, Jin Yao wrote:
SNIP
+ name, config_terms, pmu);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
int
[get-dynamic-info.h:131 -> get-dynamic-info.h:157]ld-2.27.so
0.07% 690.09% 17
[intel_pmu_drain_pebs_nhm+432 -> intel_pmu_drain_pebs_nhm+468]
[kernel.kallsyms]
Now the hottest block is reported at the top of output.
Fixes: b65a7d37
Kernel has supported COMETLAKE/COMETLAKE_L to use the SKYLAKE
events and supported TIGERLAKE_L/TIGERLAKE/ROCKETLAKE to use
the ICELAKE events. But pmu-events mapfile.csv is missing
these model numbers.
Now add the missing model numbers to mapfile.csv.
Signed-off-by: Jin Yao
---
tools/perf/pmu
Add basic hybrid test cases for 'Parse event definition strings' test.
# ./perf test 6
6: Parse event definition strings : Ok
Signed-off-by: Jin Yao
---
v3:
- Use PERF_TYPE_RAW for cpu_core/cycles/
tools/perf/tests/parse-even
Force to create one event "cpu_core/cycles/" by default,
otherwise in evlist__valid_sample_type, the checking of
'if (evlist->core.nr_entries == 1)' would be failed.
# ./perf test 41
41: Session topology : Ok
Signed-
'cpu_core/cycles/'
# Event count (approx.): 22043448
#
# Overhead Command Shared ObjectSymbol
# ...
#
...
Signed-off-by: Jin Yao
---
v3:
- New patch in v3.
tools/perf/builtin-rec
Since for "cycles:u' on hybrid platform, it creates two "cycles".
So the second evsel in evlist also needs initialization.
With this patch,
# ./perf test 71
71: Convert perf time to TSC: Ok
Signed-off-by: Jin Yao
---
v3:
-
: Ok
Signed-off-by: Jin Yao
---
v3:
- No functional change.
tools/perf/tests/switch-tracking.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/switch-tracking.c
b/tools/perf/tests/switch-tracking.c
index 3ebaa758df77..3a12176f8c46
Add some words and examples to help understanding of
Intel hybrid perf support.
Signed-off-by: Jin Yao
---
v3:
- No functional change.
tools/perf/Documentation/intel-hybrid.txt | 228 ++
tools/perf/Documentation/perf-record.txt | 1 +
tools/perf/Documentation/perf
Some events are not supported. Only pick up some cases for hybrid.
# ./perf test 67
67: Parse and process metrics : Ok
Signed-off-by: Jin Yao
---
v3:
- No functional change.
tools/perf/tests/parse-metric.c | 10 --
1 file changed, 8
8 cpu_core/instructions/
841,158,734 cpu_atom/instructions/
1.002644773 seconds time elapsed
Now there is no shadow stat 'insn per cycle' reported. We will support
it later and now just skip the 'perf stat metrics (shadow stat) test'.
Signed-off-by
179869184-4] matches []
expected type=6, got 0
expected config=17179869184, got 0
FAILED './tests/attr/test-stat-C0' - match failure
The type matching is failed because one type is 0 but the
type of hybrid hardware event is 6. We temporarily skip this
test case and TODO in future.
S
d by 2.
# ./perf test 14
14: Roundtrip evsel->name : Ok
Signed-off-by: Jin Yao
---
v3:
- No functional change.
tools/perf/tests/evsel-roundtrip-name.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/tools/p
59,350 cpu_core/cycles/
S0-D0-C20 2 1,559,589 cpu_core/cycles/
S0-D0-C24 2163,924 cpu_core/cycles/
S0-D0-C28 2376,610 cpu_core/cycles/
1.003621290 seconds time elapsed
Signed-off-by: Jin Yao
---
v3:
-
For a hybrid system, the perf subsystem doesn't know which PMU the
events belong to. So the PMU aware version PERF_TYPE_HARDWARE_PMU and
PERF_TYPE_HW_CACHE_PMU are introduced.
Now define the new output[] entries for these two types.
Signed-off-by: Jin Yao
---
v3:
- No change.
tools
ats
need to be improved in future if we want to get the original shadow
stats.
Signed-off-by: Jin Yao
---
v3:
- No functional change.
tools/perf/builtin-stat.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 7b2
5,438,125 cpu_core/cycles/
3,914,586 cpu_atom/cycles/
1.004250966 seconds time elapsed
Signed-off-by: Jin Yao
---
v3:
- Change the processing logic. In v2, it just reported the warning
and returned error. But in v3, we also disable grouping.
tools/perf/builtin-stat.c |
would be called during
parsing. The parse_state->pmu_name is used to identify the pmu
where the event should be enabled on.
After:
# ./perf stat -e cpu_core/LLC-loads/ -a -- sleep 1
Performance counter stats for 'system wide':
24,593 cpu_core/LLC-loads/
pe.
Signed-off-by: Jin Yao
---
v3:
- Raw event creation is moved to parse-events-hybrid.c.
tools/perf/util/parse-events-hybrid.c | 38 +++
1 file changed, 38 insertions(+)
diff --git a/tools/perf/util/parse-events-hybrid.c
b/tools/perf/util/parse-events-hybrid.c
ind
-1 cpu 23 group_fd -1 flags 0x8 = 29
We have to create evlist-hybrid.c otherwise due to the symbol
dependency the perf test python would be failed.
Signed-off-by: Jin Yao
---
v3:
- Move the major code to new created evlist-hybrid.c.
tools/perf/builtin-recor
ranches/ -a -- sleep 1
Performance counter stats for 'system wide':
490,951 cpu_core/branches/
1.003693946 seconds time elapsed
Signed-off-by: Jin Yao
---
v3:
- New patch in v3.
tools/perf/util/pmu.c | 32
1 file cha
0x4 in 0x4 indicates the cpu_core pmu.
0xa in 0xa indicates the cpu_atom pmu.
Signed-off-by: Jin Yao
---
v3:
- Hybrid cache event creation is moved to parse-events-hybrid.c.
tools/perf/util/parse-events-hybrid.c | 23 +++
tools/perf/util/parse-events-hybrid
ime elapsed
type 6 is PERF_TYPE_HARDWARE_PMU.
0x4 in 0x4 indicates the cpu_core pmu.
0xa in 0xa indicates the cpu_atom pmu.
Signed-off-by: Jin Yao
---
v3:
- Create new parse-events-hybrid.c/parse-events-hybrid.h
- Refine the code
tools/perf/util/Build | 1
On hybrid platform, one event is available on one pmu
(such as, available on cpu_core or on cpu_atom).
This patch saves the pmu name to the pmu field of struct perf_pmu_alias.
Then next we can know the pmu which the event can be enabled on.
Signed-off-by: Jin Yao
---
v3:
- Change pmu to
d_pmus' and then next we just need
to iterate the list to get all hybrid pmu by using
perf_pmu__for_each_hybrid_pmu.
Signed-off-by: Jin Yao
---
v3:
- No functional change.
tools/perf/util/Build| 1 +
tools/perf/util/pmu-hybrid.c | 35 +++
tools
test python would be failed.
Signed-off-by: Jin Yao
---
v3:
- Move perf_pmu__has_hybrid from pmu-hybrid.c to pmu.c. We have to
add pmu-hybrid.c to python-ext-sources to solve symbol dependency
issue found in perf test python. For perf_pmu__has_hybrid, it calls
perf_pmu__scan, which is de
o:
"cpu_core/cycles/"
Signed-off-by: Jin Yao
---
v3:
- No functional change.
tools/perf/builtin-stat.c | 4
tools/perf/util/stat-display.c | 13 +++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/bui
nt = "period=103,umask=0x80,event=0xd2",
.desc = "Counts the number of load ops retired that. Unit: cpu_atom ",
.topic = "cache",
.pmu = "cpu_atom",
},
But if without this patch, the "uncore_" prefix is added before &q
Simplify the arguments of __perf_pmu__new_alias() by passing
the whole 'struct pme_event' pointer.
Signed-off-by: Jin Yao
---
v3:
- No change.
tools/perf/util/pmu.c | 36
1 file changed, 16 insertions(+), 20 deletions(-)
diff --git a/tools/perf/
ch is upstreamed.
Signed-off-by: Jin Yao
---
v3:
- No change.
tools/include/uapi/linux/perf_event.h | 26 ++
1 file changed, 26 insertions(+)
diff --git a/tools/include/uapi/linux/perf_event.h
b/tools/include/uapi/linux/perf_event.h
index ad15e40d7f5d..c0a511eea498 1
;struct pme_event' pointer.
- Check sysfs validity before access.
- Use pmu style event name, such as "cpu_core/cycles/".
- Move command output two chars to the right.
- Move pmu hybrid functions to new created pmu-hybrid.c/pmu-hybrid.h.
This is to pass the perf test python case.
J
y" string would
not be added, also check with this case.
Signed-off-by: Jin Yao
---
v3:
- New in v3.
tools/perf/tests/shell/stat+cvs_summary.sh | 31 ++
1 file changed, 31 insertions(+)
create mode 100755 tools/perf/tests/shell/stat+cvs_summary.sh
diff --git a/tools/
4,,branches,8013366204,100.00,69.081,K/sec
54021,,branch-misses,8013375952,100.00,9.76,of all branches
Signed-off-by: Jin Yao
---
v3:
- No change.
v2:
- Add new option '--no-cvs-summary'.
- Add perf config variable 'stat.no-cvs-summary'.
tools/perf/Documentation/p
.
Fair enough, lets fix the default then. Jin, can you please consider
adding a 'perf test' shell entry to parse the CSV mode with/without that
summary? This way we'll notice when the new normal gets broken.
- Arnaldo
Thanks Arnaldo! I will post v3 with the perf test script.
Thanks
Jin Yao
Hi Jiri,
On 3/17/2021 6:06 PM, Jiri Olsa wrote:
On Wed, Mar 17, 2021 at 10:12:03AM +0800, Jin, Yao wrote:
On 3/16/2021 10:04 PM, Jiri Olsa wrote:
On Tue, Mar 16, 2021 at 09:49:42AM +0800, Jin, Yao wrote:
SNIP
Performance counter stats for 'system wide':
1
4,,branches,8013366204,100.00,69.081,K/sec
54021,,branch-misses,8013375952,100.00,9.76,of all branches
Signed-off-by: Jin Yao
---
v2:
- Add new option '--no-cvs-summary'.
- Add perf config variable 'stat.no-cvs-summary'.
tools/perf/Documentation/perf-stat.txt | 9
On 3/16/2021 10:04 PM, Jiri Olsa wrote:
On Tue, Mar 16, 2021 at 09:49:42AM +0800, Jin, Yao wrote:
SNIP
Performance counter stats for 'system wide':
136,655,302 cpu_core/branch-instructions/
1.003171561 seconds time elapsed
So we need special rules for b
hidden in the perf config file instead
of being on the command line.
-Andi
That makes sense, thanks Andi!
Thanks
Jin Yao
ption forever
just to get sane output.
I like that.. also we'll find out how many people are actually parsing that ;-)
jirka
Is it serious or just a joke? :)
Thanks
Jin Yao
Or maybe only a perf config option.
-Andi
summary,7954691,,instructions,8012804027,100.00,0.53,insn per cycle
summary,1590259,,branches,8012814766,100.00,0.198,M/sec
summary,82601,,branch-misses,8012824365,100.00,5.19,of all branches
Now it's easy for script to analyse the summary lines.
Signed-off-by: Jin
Hi Jiri,
On 3/16/2021 7:03 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:31PM +0800, Jin Yao wrote:
SNIP
goto try_again;
}
+
+ if (errno == EINVAL && perf_pmu__hybr
Hi Jiri,
On 3/16/2021 7:04 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:32PM +0800, Jin Yao wrote:
A group mixed with hybrid event and global event is allowed. For example,
group leader is 'cpu-clock' and the group member is 'cpu_atom/cycles/'.
e.g.
perf stat -e
Hi Jiri,
On 3/16/2021 7:05 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:25PM +0800, Jin Yao wrote:
SNIP
+ config_terms, pmu);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
int
Hi Jiri,
On 3/16/2021 7:05 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:24PM +0800, Jin Yao wrote:
For hardware events, they have pre-defined configs. The kernel
needs to know where the event comes from (e.g. from cpu_core pmu
or from cpu_atom pmu). But the perf type 'PERF_TYPE_HAR
Hi Jiri,
On 3/16/2021 1:37 AM, Jiri Olsa wrote:
On Mon, Mar 15, 2021 at 10:28:12AM +0800, Jin, Yao wrote:
Hi Jiri,
On 3/13/2021 3:15 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:26PM +0800, Jin Yao wrote:
On hybrid platform, some hardware events are only available
on a specific pmu
Hi Jiri,
On 3/16/2021 7:03 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:19PM +0800, Jin Yao wrote:
On hybrid platform, one event is available on one pmu
(such as, available on cpu_core or on cpu_atom).
This patch saves the pmu name to the pmu field of struct perf_pmu_alias.
Then next we
Hi Jiri,
On 3/13/2021 3:15 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:26PM +0800, Jin Yao wrote:
On hybrid platform, some hardware events are only available
on a specific pmu. For example, 'L1-dcache-load-misses' is only
available on 'cpu_core' pmu. And even for th
Hi Jiri,
On 3/13/2021 3:15 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:24PM +0800, Jin Yao wrote:
SNIP
cycles: 4: 800933425 1002536659 1002536659
cycles: 5: 800928573 1002528386 1002528386
cycles: 6: 800924347 1002520527 1002520527
cycles: 7: 800922009 1002513176
Hi Jiri,
On 3/13/2021 3:15 AM, Jiri Olsa wrote:
On Thu, Mar 11, 2021 at 03:07:22PM +0800, Jin Yao wrote:
On hybrid platform, atom events can be only enabled on atom CPUs. Core
events can be only enabled on core CPUs. So for a hybrid event, it can
be only enabled on it's own CPUs.
Bu
Since for "cycles:u' on hybrid platform, it creates two "cycles".
So the second evsel in evlist also needs initialization.
With this patch,
root@otcpl-adl-s-2:~# ./perf test 71
71: Convert perf time to TSC: Ok
Signed-off-by: Jin Yao
-
8 cpu_core/instructions/
841,158,734 cpu_atom/instructions/
1.002644773 seconds time elapsed
Now there is no shadow stat 'insn per cycle' reported. We will support
it later and now just skip the 'perf stat metrics (shadow stat) test'.
Signed-off-by: J
Add some words and examples to help understanding of
Intel hybrid perf support.
Signed-off-by: Jin Yao
---
tools/perf/Documentation/intel-hybrid.txt | 228 ++
tools/perf/Documentation/perf-record.txt | 1 +
tools/perf/Documentation/perf-stat.txt| 2 +
3 files
Add basic hybrid test cases for 'Parse event definition strings' test.
root@otcpl-adl-s-2:~# ./perf test 6
6: Parse event definition strings : Ok
Signed-off-by: Jin Yao
---
tools/perf/tests/parse-events.c | 171
1 fi
[]
expected type=6, got 0
expected config=17179869184, got 0
FAILED './tests/attr/test-stat-C0' - match failure
The type matching is failed because one type is 0 but the
type of hybrid hardware event is 6. We temporarily skip this
test case and TODO in future.
Signed-off-by: Jin Yao
Force to create one event "cpu_core/cycles/" by default,
otherwise in evlist__valid_sample_type, the checking of
'if (evlist->core.nr_entries == 1)' would be failed.
root@otcpl-adl-s-2:~# ./perf test 41
41: Session topology :
Some events are not supported. Only pick up some cases for hybrid.
root@otcpl-adl-s-2:~# ./perf test 67
67: Parse and process metrics : Ok
Signed-off-by: Jin Yao
---
tools/perf/tests/parse-metric.c | 11 ---
1 file changed, 8 insertions(+), 3
d by 2.
root@otcpl-adl-s-2:~# ./perf test 14
14: Roundtrip evsel->name : Ok
Signed-off-by: Jin Yao
---
tools/perf/tests/evsel-roundtrip-name.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/tools/perf/te
35
35: Track with sched_switch : Ok
Signed-off-by: Jin Yao
---
tools/perf/tests/switch-tracking.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/switch-tracking.c
b/tools/perf/tests/switch-tracking.c
index 3ebaa758df77..13a11ce51a1a 100644
different hybrid PMUs
Performance counter stats for 'sleep 1':
cpu_core/cycles/
cpu_atom/cycles/
1.002585908 seconds time elapsed
Signed-off-by: Jin Yao
---
tools/perf/builtin-record.c | 3 +++
tools/perf/builtin-stat.c | 7 ++
tools/perf/u
cpu23 are set with valid group fd (cpu_atom/cycles/'s
fd on that cpu). For counting results, cpu_atom/cycles/ has 8 cpus aggregation
, that's correct. But for cpu-clock, it also has 8 cpus aggregation
(cpu16-cpu23, but not all cpus), the code should be improved. Now one warning
is displayed
For a hybrid system, the perf subsystem doesn't know which PMU the
events belong to. So the PMU aware version PERF_TYPE_HARDWARE_PMU and
PERF_TYPE_HW_CACHE_PMU are introduced.
Now define the new output[] entries for these two types.
Signed-off-by: Jin Yao
---
tools/perf/builtin-script.c
31,725 cpu_core/cycles/
S0-D0-C20 2 1,603,435,286 cpu_core/cycles/
S0-D0-C24 2 1,603,387,250 cpu_core/cycles/
S0-D0-C28 2 1,604,173,183 cpu_core/cycles/
Signed-off-by: Jin Yao
---
tools/perf/util/stat-display.c | 20
shadow stats looks a bit different, now it's just
'M/sec'.
The perf_stat__update_shadow_stats and perf_stat__print_shadow_stats
need to be improved in future if we want to get the original shadow
stats.
Signed-off-by: Jin Yao
---
tools/perf/builtin-stat.c | 22
unter stats for './triad_loop':
449,000,613 cpu_core/r3c/
0.294859229 seconds time elapsed
Signed-off-by: Jin Yao
---
tools/perf/util/parse-events.c | 56 +-
1 file changed, 55 insertions(+), 1 deletion(-)
diff --git a/tools/perf/ut
x4 indicates the cpu_core pmu.
0xa in 0xa indicates the cpu_atom pmu.
Signed-off-by: Jin Yao
---
tools/perf/util/parse-events.c | 54 +-
1 file changed, 53 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/parse-events.c b/tool
sys_perf_event_open: pid 22300 cpu 22 group_fd -1 flags 0x8 = 28
sys_perf_event_open: pid 22300 cpu 23 group_fd -1 flags 0x8 = 29
...
We can see one core 'cycles' (0x4) is enabled on cpu0-cpu15
and atom 'cycles' (0xa) is enabled on cpu16-cpu23.
S
1 - 100 of 1001 matches
Mail list logo