From: Xia Kaixu xiaka...@huawei.com
Debugfs isn't used for coresight configuration, so the macro
CORESIGHT_DEBUGFS_ENTRY is unnecessary, just remove it.
Signed-off-by: Xia Kaixu xiaka...@huawei.com
---
include/linux/coresight.h | 9 -
1 file changed, 9 deletions(-)
diff --git
Debugfs isn't used for coresight configuration, so the corresponding
comments should be changed.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
drivers/coresight/of_coresight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/coresight/of_coresight.c b/drivers
There are some extra spaces, so just remove them from these lines.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
drivers/coresight/coresight-etb10.c | 2 +-
drivers/coresight/coresight.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/coresight/coresight
The right debug AMBA bus name should be APB(Advanced Peripheral Bus),
so just fix it.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
Documentation/trace/coresight.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/trace/coresight.txt
b/Documentation
This function coresight_is_bit_set() isn't called, so we should
remove it.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/coresight.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index 5d3c543..a860933 100644
.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 882f835..abb57c2 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4268,7 +4268,7 @@ static int
Just fix a minor typo about the example path.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
Documentation/devicetree/bindings/graph.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/graph.txt
b/Documentation/devicetree/bindings
Outports is a member of the struct pdata and should be
a better choice.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
drivers/coresight/of_coresight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/coresight/of_coresight.c b/drivers/coresight/of_coresight.c
index
Now we use the device name to identify replicator instead
of a unique number, so just remove it.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
Documentation/devicetree/bindings/arm/coresight.txt | 4
1 file changed, 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm
According to the classification, the type of replicator
is link, so the subtype should also be link_subtype.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
drivers/coresight/coresight-replicator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/coresight/coresight
The right return value is rdev, so we should judge it.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
drivers/coresight/of_coresight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/coresight/of_coresight.c b/drivers/coresight/of_coresight.c
index 5030c07..5b5f188
-by: Kaixu Xia xiaka...@huawei.com
---
drivers/coresight/coresight.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/coresight/coresight.c b/drivers/coresight/coresight.c
index 6e0181f..11968b7 100644
--- a/drivers/coresight/coresight.c
+++ b/drivers/coresight
This minor change is necessary to make more sense.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
drivers/coresight/coresight-priv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/coresight/coresight-priv.h
b/drivers/coresight/coresight-priv.h
index 7b3372f
The judgement of configuration coresight-default-sink has been
removed from the framework. So just remove it from DT and bindings.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
Documentation/devicetree/bindings/arm/coresight.txt | 1 -
arch/arm/boot/dts/hip04.dtsi| 1
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h| 1 +
include
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf
and add fewer lines of special code.
Signed-off-by: Wang Nan wangn...@huawei.com
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
arch/x86/net/bpf_jit_comp.c | 6 ++--
include/linux/bpf.h | 8 +++--
kernel/bpf/arraymap.c | 80 +++--
kernel/bpf
to struct perf_event;
Patch 3/4 implements function bpf_perf_event_read() that get the
selected hardware PMU conuter;
Patch 4/4 gives a simple example.
Kaixu Xia (3):
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Implement function bpf_perf_event_read() that get
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
() that get the
selected hardware PMU conuter;
Patch 4/4 gives a simple example.
Kaixu Xia (3):
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Implement function bpf_perf_event_read() that get the selected
hardware PMU conuter
samples/bpf: example of get
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h| 1 +
include
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf
, buf=0078c010,
size=512)
dd-1051 [000] d...26.712704: : write(fd=1, buf=0078c010,
size=512)
...
Signed-off-by: Wang Nan wangn...@huawei.com
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
arch/x86/net/bpf_jit_comp.c | 6 ++--
include/linux/bpf.h | 8
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h| 1 +
include
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
the
selected hardware PMU conuter;
Patch 4/4 gives a simple example.
Kaixu Xia (3):
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Implement function bpf_perf_event_read() that get the selected
hardware PMU conuter
samples/bpf: example of get selected PMU counter
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf
, buf=0078c010,
size=512)
dd-1051 [000] d...26.712704: : write(fd=1, buf=0078c010,
size=512)
...
Signed-off-by: Wang Nan wangn...@huawei.com
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h | 6 ++-
kernel/bpf/arraymap.c | 104
There is a build error that 'struct bpf_array' has no member
named 'prog' on s390. In commit 2a36f0b, the member 'prog' of
struct bpf_array is replaced by 'ptrs'. So this patch fixes it.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
arch/s390/net/bpf_jit_comp.c | 4 ++--
1 file changed, 2
more generic)
Reported-by: Wu Fengguang fengguang...@intel.com
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
arch/s390/net/bpf_jit_comp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index 9f4bbc0..eeda051 100644
'Kbuild test robot' sent me an email about a build error
'struct bpf_array' has no member named 'prog' in s390
architecture. This error is caused by commit: 2a36f0b92eb
638dd023870574eb471b1c56be9ad [656/692] bpf: Make the bpf
_prog_array_map more generic. In this patch, the member 'prog'
of
the
selected hardware PMU conuter;
Patch 5/5 gives a simple example.
Kaixu Xia (4):
perf: add the necessary core perf APIs when accessing events counters
in eBPF programs
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Implement function bpf_perf_event_read() that get
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
accessing events counters in eBPF programs.
The API perf_event_read_local() comes from Peter and I add the
corresponding SOB.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
Signed-off-by: Peter Zijlstra a.p.zijls...@chello.nl
---
include/linux/perf_event.h | 10 ++
kernel/events/core.c
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h | 1 +
include/uapi
and add fewer lines of special code.
Signed-off-by: Wang Nan wangn...@huawei.com
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
arch/x86/net/bpf_jit_comp.c | 6 ++--
include/linux/bpf.h | 8 +++--
kernel/bpf/arraymap.c | 80 +++--
kernel/bpf
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf
sshd-683 [000] d..1 131.429378: : CPU-0 222561024
...
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
samples/bpf/tracex6_kern.c | 1 +
samples/bpf/tracex6_user.c | 22 +-
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/samples/bpf
is lacked.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h| 1 +
include/linux/perf_event.h | 3 ++-
include/uapi/linux/bpf.h | 2 ++
kernel/bpf/helpers.c | 42 ++
kernel/events/core.c | 4 ++--
kernel/trace
structure when
add new element to the map;
Patch 4/5 implement function bpf_perf_event_read() that get the selected
hardware PMU conuter;
Patch 5/5 give a simple example.
Kaixu Xia (5):
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Add function map-ops
The user space event FDs from perf_event_open() syscall are
converted to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/perf_event.h | 2 ++
kernel/bpf/arraymap.c | 53 ++
kernel
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 27 +++
samples/bpf
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map will only store the pointer to struct perf_event.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h | 2 ++
include/uapi/linux/bpf.h | 1 +
kernel/bpf/arraymap.c| 40
We want to traverse the map elements and make use
of the map value one by one. So add new function
map-ops-map_traverse_elem() to traverse map elements.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h | 3 +++
kernel/bpf/arraymap.c | 17 +
2 files changed
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
include/linux/bpf.h| 1 +
include
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf
a simple example.
Kaixu Xia (3):
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Implement function bpf_perf_event_read() that get the selected
hardware PMU conuter
samples/bpf: example of get selected PMU counter value
include/linux/bpf.h| 3 ++
include
Sometimes we want to traverse the map elements and make use
of the map value one by one. So add new function
map-ops-map_traverse_elem() to traverse map elements.
Signed-off-by: kaixu xia xiaka...@huawei.com
---
include/linux/bpf.h |3 +++
kernel/bpf/arraymap.c | 17
For the pmu that contains the pointer to struct perf_event,
add the corresponding bpf program function argument constraint
'ARG_PTR_TO_MAP_PERF_EVENT_VALUE'.
Signed-off-by: kaixu xia xiaka...@huawei.com
---
include/linux/bpf.h |1 +
kernel/bpf/verifier.c |9 +
2 files changed
...
Signed-off-by: kaixu xia xiaka...@huawei.com
---
samples/bpf/bpf_helpers.h |2 +
samples/bpf/bpf_pmu_test.c | 143
2 files changed, 145 insertions(+)
create mode 100644 samples/bpf/bpf_pmu_test.c
diff --git a/samples/bpf/bpf_helpers.h b
give a simple example.
kaixu xia (6):
bpf: Add new flags that specify the value type stored in map
bpf: Add function map-ops-map_traverse_elem() to traverse map elems
bpf: Save the pointer to struct perf_event to map
bpf: Add a bpf program function argument constraint for PMU map
bpf
The pointer to struct perf_event will be stored in map. So
add new flag BPF_MAP_FLAG_PERF_EVENT that specify the value
type stored in map. The high 8-bit of attr-map_type is used
to contain the new flags.
Signed-off-by: kaixu xia xiaka...@huawei.com
---
include/linux/bpf.h |1 +
include
The user space event FD from perf_event_open() syscall is converted
to the pointer to struct perf event and stored in map.
Signed-off-by: kaixu xia xiaka...@huawei.com
---
include/linux/perf_event.h |2 ++
kernel/bpf/syscall.c | 68
kernel
The function bpf_read_pmu() can get the specific map key, convert
the corresponding map value to the pointer to struct perf_event and
return the Hardware PMU counter value.
Signed-off-by: kaixu xia xiaka...@huawei.com
---
include/linux/bpf.h |2 ++
include/uapi/linux/bpf.h |2
the perf
event on current cpu or all the perf events stored in the maps by
checking the third parameter 'flag'.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
include/linux/perf_event.h | 1 +
include/uapi/linux/bpf.h| 19 +++
include/uapi/linux/perf_event.
ng in function level, we have to set
a high sample frequency to dump trace data when enable/disable
the perf event on current cpu.
Kaixu Xia (1):
bpf: control events stored in PERF_EVENT_ARRAY maps trace data output
when perf sampling
include/linux/perf_event.h | 1 +
bpf_prog_2(struct pt_regs *ctx)
{
bpf_perf_event_dump_control(_cycles_map, 32, 1);
return 0;
}
Consider control sampling in function level, we have to set
a high sample frequency to dump trace data when enable/disable
the perf event on current cpu.
Kaixu Xia (2):
bpf: control the trace data output on curren
This patch implements the function that controlling all the perf
events stored in PERF_EVENT_ARRAY maps by setting the parameter
'index' to maps max_entries.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
kernel/trace/bpf_trace.c | 20 ++--
1 file changed, 18 insertions
the
perf_event on current cpu.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
include/linux/perf_event.h | 1 +
include/uapi/linux/bpf.h| 5 +
include/uapi/linux/perf_event.h | 3 ++-
kernel/bpf/verifier.c | 3 ++-
kernel/events/core.c
int bpf_prog_2(struct pt_regs *ctx)
{
bpf_perf_event_control(_cycles_map, 0, 2);
return 0;
}
Consider control sampling in function level, we have to set
a high sample frequency to dump trace data when enable/disable
the perf event on current cpu.
Kaixu Xia (1):
bpf: control events s
the perf
event on current cpu or all the perf events stored in the maps by
checking the third parameter 'flags'.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
include/linux/perf_event.h | 1 +
include/uapi/linux/bpf.h| 11
include/uapi/linux/perf_event.h | 3 +-
kern
the
perf_event on current cpu.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
include/linux/perf_event.h | 1 +
include/uapi/linux/bpf.h| 5 +
include/uapi/linux/perf_event.h | 3 ++-
kernel/bpf/verifier.c | 3 ++-
kernel/events/core.c
quot;)
int bpf_prog_2(struct pt_regs *ctx)
{
bpf_perf_event_sample_control(_cycles_map, 32, 1);
return 0;
}
Consider control sampling in function level, if we don't use the
PERF_EVENT_IOC_SET_ENABLER ioctl in perf user side, we must set
a high sample frequency to dump tra
This patch creates a new ioctl PERF_EVENT_IOC_SET_ENABLER to let
perf to select an event as 'enabler'. So we can set this 'enabler'
event to enable/disable a set of events. The event on CPU 0 is
treated as the 'enabler' event by default.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
i
;
return 0;
}
SEC("exit=sys_write%return")
int bpf_prog_2(struct pt_regs *ctx)
{
bpf_perf_event_sample_disable(_cycles_map);
return 0;
}
Kaixu Xia (2):
perf: Add the flag sample_disable not to output data on samples
bpf: Implement bpf_pe
-off-by: Kaixu Xia <xiaka...@huawei.com>
---
include/linux/bpf.h| 1 +
include/linux/perf_event.h | 2 ++
kernel/bpf/arraymap.c | 5 +
kernel/events/core.c | 3 +++
4 files changed, 11 insertions(+)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index f57d7fe..2
The functions bpf_perf_event_sample_enable/disable() can set the
flag sample_disable to enable/disable output trace data on samples.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
include/linux/bpf.h | 2 ++
include/uapi/linux/bpf.h | 2 ++
kernel/bpf/verifier.c| 4 +++-
the pointers to struct perf_event in
BPF_MAP_TYPE_PERF_EVENT_ARRAY maps.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
tools/lib/bpf/libbpf.c | 76 --
tools/lib/bpf/libbpf.h | 13 +
2 files changed, 74 insertions(+), 15 deletions(-)
diff
);
return 0;
}
Kaixu Xia (4):
bpf tools: Add bpf_update_elem() and perf_event_open() for common bpf
operations
bpf tools: Collect BPF_MAP_TYPE_PERF_EVENT_ARRAY map definitions from
'maps' section
bpf tools: Save the perf event fds from maps sections to 'struct
bpf_object'
bpf
This patch saves the perf_event fds from maps sections to struct
bpf_object. So we can enable/disable these perf events at the
appropriate time.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
tools/lib/bpf/libbpf.c | 28 ++--
1 file changed, 26 insertions(+), 2
This patch introduces bpf_update_elem() and perf_event_open()
in bpf.c/h for common bpf operations.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
tools/lib/bpf/bpf.c | 34 ++
tools/lib/bpf/bpf.h | 4
2 files changed, 38 insertions(+)
diff --git a/tools
This patch enable/disable the perf events stored in 'struct
bpf_object' at the appropriate time. These events we're
interested in come from 'maps' sections.
Signed-off-by: Kaixu Xia xiaka...@huawei.com
---
tools/lib/bpf/libbpf.c | 30 ++
1 file changed, 30 insertions
26):(31726:31726)
test child finished with 0
end
Validate PERF_RECORD_* events & perf_sample fields: Ok
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
tools/perf/tests/perf-record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/t
The right variable definition should be wb_congested_state that
include WB_async_congested and WB_sync_congested. So fix it.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
mm/backing-dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/backing-dev.c b/mm/b
This patch shows the fault injection mount option in
f2fs_show_options().
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
fs/f2fs/super.c |5 +
1 file changed, 5 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 46fd30d..47880b4 100644
--- a/fs/f2fs/super.c
++
The variable 'i' has been defined before, so here we can
use it directly.
Signed-off-by: Kaixu Xia <xiaka...@huawei.com>
---
fs/f2fs/checkpoint.c |1 -
1 file changed, 1 deletion(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 0339daf..2e42684 100644
--- a/f
The right return value is rdev, so we should judge it.
Signed-off-by: Kaixu Xia
---
drivers/coresight/of_coresight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/coresight/of_coresight.c b/drivers/coresight/of_coresight.c
index 5030c07..5b5f188 100644
,
size=512)
dd-1051 [000] d...26.712704: : write(fd=1, buf=0078c010,
size=512)
...
Signed-off-by: Wang Nan
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h | 6 ++-
kernel/bpf/arraymap.c | 104 +++---
kernel/bpf
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h| 1 +
include/linux/perf_event.h | 3
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h
/4 implements function bpf_perf_event_read() that get the
selected hardware PMU conuter;
Patch 4/4 gives a simple example.
Kaixu Xia (3):
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Implement function bpf_perf_event_read() that get the selected
hardware PMU conu
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf/tracex6_user.c | 67
accessing events counters in eBPF programs.
The API perf_event_read_local() comes from Peter and I add the
corresponding SOB.
Signed-off-by: Kaixu Xia
Signed-off-by: Peter Zijlstra
---
include/linux/perf_event.h | 10 ++
kernel/events/core.c | 78
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 1
of special code.
Signed-off-by: Wang Nan
Signed-off-by: Kaixu Xia
---
arch/x86/net/bpf_jit_comp.c | 6 ++--
include/linux/bpf.h | 8 +++--
kernel/bpf/arraymap.c | 80 +++--
kernel/bpf/core.c | 2 +-
kernel/bpf/syscall.c
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf/tracex6_user.c | 68
ch 4/5 implements function bpf_perf_event_read() that get the
selected hardware PMU conuter;
Patch 5/5 gives a simple example.
Kaixu Xia (4):
perf: add the necessary core perf APIs when accessing events counters
in eBPF programs
bpf: Add new bpf map type to store the pointer
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h
perf_event;
Patch 3/4 implements function bpf_perf_event_read() that get the
selected hardware PMU conuter;
Patch 4/4 gives a simple example.
Kaixu Xia (3):
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Implement function bpf_perf_event_read() that get the selected
h
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h| 1 +
include/linux/perf_event.h | 12
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf/tracex6_user.c | 68
,
size=512)
dd-1051 [000] d...26.712704: : write(fd=1, buf=0078c010,
size=512)
...
Signed-off-by: Wang Nan
Signed-off-by: Kaixu Xia
---
arch/x86/net/bpf_jit_comp.c | 6 ++--
include/linux/bpf.h | 8 +++--
kernel/bpf/arraymap.c | 80
According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h| 1 +
include/linux/perf_event.h | 3
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia
---
samples/bpf/Makefile | 4 +++
samples/bpf/bpf_helpers.h | 2 ++
samples/bpf/tracex6_kern.c | 26 ++
samples/bpf/tracex6_user.c | 67
f_event_read() that get the selected
hardware PMU conuter;
Patch 3/3 give a simple example.
Kaixu Xia (3):
bpf: Add new bpf map type to store the pointer to struct perf_event
bpf: Implement function bpf_perf_event_read() that get the selected
hardware PMU conuter
samples/bpf: exampl
Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h
We want to traverse the map elements and make use
of the map value one by one. So add new function
map->ops->map_traverse_elem() to traverse map elements.
Signed-off-by: Kaixu Xia
---
include/linux/bpf.h | 3 +++
kernel/bpf/arraymap.c | 17 +
2 files changed, 20 inse
1 - 100 of 159 matches
Mail list logo