Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
---
Since v1:
- add BUILD_BUG_ON() macro usage to make sure that the size of what is being
copied, is not smaller than the amount being copied. Thank Steve.
- move optee_trace.h to keep include headers sorted
drivers/tee/optee/call.c | 4 ++
drivers/tee/optee/optee_trace.h | 67 +++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
create mode 100644 drivers/tee/optee/optee_trace.h
From: Steven Rostedt <rostedt@goodmis.org> Date: 2021-02-10 14:38:46
On Wed, 10 Feb 2021 14:44:09 +0800
Jisheng Zhang [off-list ref] wrote:
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
---
Since v1:
- add BUILD_BUG_ON() macro usage to make sure that the size of what is being
copied, is not smaller than the amount being copied. Thank Steve.
- move optee_trace.h to keep include headers sorted
From a tracing point of view:
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Jisheng,
On Wed, Feb 10, 2021 at 7:44 AM Jisheng Zhang
[off-list ref] wrote:
quoted hunk
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
---
Since v1:
- add BUILD_BUG_ON() macro usage to make sure that the size of what is being
copied, is not smaller than the amount being copied. Thank Steve.
- move optee_trace.h to keep include headers sorted
drivers/tee/optee/call.c | 4 ++
drivers/tee/optee/optee_trace.h | 67 +++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
create mode 100644 drivers/tee/optee/optee_trace.h
On Tue, 23 Feb 2021 08:59:22 +0100 Jens Wiklander wrote:
Hi Jisheng,
Hi Jens,
On Wed, Feb 10, 2021 at 7:44 AM Jisheng Zhang
[off-list ref] wrote:
quoted
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
---
Since v1:
- add BUILD_BUG_ON() macro usage to make sure that the size of what is being
copied, is not smaller than the amount being copied. Thank Steve.
- move optee_trace.h to keep include headers sorted
drivers/tee/optee/call.c | 4 ++
drivers/tee/optee/optee_trace.h | 67 +++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
create mode 100644 drivers/tee/optee/optee_trace.h
Checkpatch has some complaints below. Is that something that could be
fixed or is this so far from regular C-syntax that we don't care?
I tried ./scripts/checkpatch.pl in Linus tree to check the patch, there's
no any error, and except the "MAINTAINERS need updating" warning, there's
no other warnings.
git log -- scripts/checkpatch.pl
shows the latest checkpatch.pl is at commit 62137364e3e8afcc745846c5c67cacf943149073
I'm not sure what happened.
Thanks
On Tue, Feb 23, 2021 at 06:40:26PM +0800, Jisheng Zhang wrote:
On Tue, 23 Feb 2021 08:59:22 +0100 Jens Wiklander wrote:
quoted
Hi Jisheng,
Hi Jens,
quoted
On Wed, Feb 10, 2021 at 7:44 AM Jisheng Zhang
[off-list ref] wrote:
quoted
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
---
Since v1:
- add BUILD_BUG_ON() macro usage to make sure that the size of what is being
copied, is not smaller than the amount being copied. Thank Steve.
- move optee_trace.h to keep include headers sorted
drivers/tee/optee/call.c | 4 ++
drivers/tee/optee/optee_trace.h | 67 +++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
create mode 100644 drivers/tee/optee/optee_trace.h
Checkpatch has some complaints below. Is that something that could be
fixed or is this so far from regular C-syntax that we don't care?
I tried ./scripts/checkpatch.pl in Linus tree to check the patch, there's
no any error, and except the "MAINTAINERS need updating" warning, there's
no other warnings.
git log -- scripts/checkpatch.pl
shows the latest checkpatch.pl is at commit 62137364e3e8afcc745846c5c67cacf943149073
I'm not sure what happened.
I used the -strict option.
./scripts/checkpatch.pl -strict 0001-tee-optee-add-invoke_fn-tracepoints.patch
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44:
new file mode 100644
CHECK: Alignment should match open parenthesis
#68: FILE: drivers/tee/optee/optee_trace.h:20:
+TRACE_EVENT(optee_invoke_fn_begin,
+ TP_PROTO(struct optee_rpc_param *param),
CHECK: Lines should not end with a '('
#71: FILE: drivers/tee/optee/optee_trace.h:23:
+ TP_STRUCT__entry(
CHECK: Lines should not end with a '('
#76: FILE: drivers/tee/optee/optee_trace.h:28:
+ TP_fast_assign(
CHECK: Alignment should match open parenthesis
#89: FILE: drivers/tee/optee/optee_trace.h:41:
+TRACE_EVENT(optee_invoke_fn_end,
+ TP_PROTO(struct optee_rpc_param *param, struct arm_smccc_res *res),
CHECK: Lines should not end with a '('
#92: FILE: drivers/tee/optee/optee_trace.h:44:
+ TP_STRUCT__entry(
CHECK: Lines should not end with a '('
#97: FILE: drivers/tee/optee/optee_trace.h:49:
+ TP_fast_assign(
total: 0 errors, 1 warnings, 6 checks, 86 lines checked
Thanks,
Jens
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Steven Rostedt <rostedt@goodmis.org> Date: 2021-02-23 14:20:23
On Tue, 23 Feb 2021 14:11:24 +0100
Jens Wiklander [off-list ref] wrote:
I used the -strict option.
./scripts/checkpatch.pl -strict 0001-tee-optee-add-invoke_fn-tracepoints.patch
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44:
new file mode 100644
The above is just asking for someone to take maintainership of the new file.
CHECK: Alignment should match open parenthesis
#68: FILE: drivers/tee/optee/optee_trace.h:20:
+TRACE_EVENT(optee_invoke_fn_begin,
+ TP_PROTO(struct optee_rpc_param *param),
CHECK: Lines should not end with a '('
#71: FILE: drivers/tee/optee/optee_trace.h:23:
+ TP_STRUCT__entry(
CHECK: Lines should not end with a '('
#76: FILE: drivers/tee/optee/optee_trace.h:28:
+ TP_fast_assign(
CHECK: Alignment should match open parenthesis
#89: FILE: drivers/tee/optee/optee_trace.h:41:
+TRACE_EVENT(optee_invoke_fn_end,
+ TP_PROTO(struct optee_rpc_param *param, struct arm_smccc_res *res),
CHECK: Lines should not end with a '('
#92: FILE: drivers/tee/optee/optee_trace.h:44:
+ TP_STRUCT__entry(
CHECK: Lines should not end with a '('
#97: FILE: drivers/tee/optee/optee_trace.h:49:
+ TP_fast_assign(
The TRACE_EVENT() macro is "special", and checkpatch notoriously stumbles
over it. I usually recommend that people ignore the checkpatch warnings on
TRACE_EVENT() macros.
-- Steve
On Tue, Feb 23, 2021 at 09:19:36AM -0500, Steven Rostedt wrote:
On Tue, 23 Feb 2021 14:11:24 +0100
Jens Wiklander [off-list ref] wrote:
quoted
I used the -strict option.
./scripts/checkpatch.pl -strict 0001-tee-optee-add-invoke_fn-tracepoints.patch
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44:
new file mode 100644
The above is just asking for someone to take maintainership of the new file.
quoted
CHECK: Alignment should match open parenthesis
#68: FILE: drivers/tee/optee/optee_trace.h:20:
+TRACE_EVENT(optee_invoke_fn_begin,
+ TP_PROTO(struct optee_rpc_param *param),
CHECK: Lines should not end with a '('
#71: FILE: drivers/tee/optee/optee_trace.h:23:
+ TP_STRUCT__entry(
CHECK: Lines should not end with a '('
#76: FILE: drivers/tee/optee/optee_trace.h:28:
+ TP_fast_assign(
CHECK: Alignment should match open parenthesis
#89: FILE: drivers/tee/optee/optee_trace.h:41:
+TRACE_EVENT(optee_invoke_fn_end,
+ TP_PROTO(struct optee_rpc_param *param, struct arm_smccc_res *res),
CHECK: Lines should not end with a '('
#92: FILE: drivers/tee/optee/optee_trace.h:44:
+ TP_STRUCT__entry(
CHECK: Lines should not end with a '('
#97: FILE: drivers/tee/optee/optee_trace.h:49:
+ TP_fast_assign(
The TRACE_EVENT() macro is "special", and checkpatch notoriously stumbles
over it. I usually recommend that people ignore the checkpatch warnings on
TRACE_EVENT() macros.
On Wed, Feb 10, 2021 at 02:44:09PM +0800, Jisheng Zhang wrote:
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
arm64:defconfig:
make-arm64 -j drivers/tee/optee/call.o
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CC drivers/tee/optee/call.o
In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
Guenter
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Wed, Mar 24, 2021 at 07:34:07AM -0700, Guenter Roeck wrote:
On Wed, Feb 10, 2021 at 02:44:09PM +0800, Jisheng Zhang wrote:
quoted
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
arm64:defconfig:
make-arm64 -j drivers/tee/optee/call.o
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CC drivers/tee/optee/call.o
In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
From: Steven Rostedt <rostedt@goodmis.org> Date: 2021-03-24 14:54:23
On Wed, 24 Mar 2021 07:48:53 -0700
Guenter Roeck [off-list ref] wrote:
On Wed, Mar 24, 2021 at 07:34:07AM -0700, Guenter Roeck wrote:
quoted
On Wed, Feb 10, 2021 at 02:44:09PM +0800, Jisheng Zhang wrote:
quoted
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
arm64:defconfig:
make-arm64 -j drivers/tee/optee/call.o
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CC drivers/tee/optee/call.o
In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
The problem also affects arm:imx_v6_v7_defconfig.
I think it affects everything. The problem is that the
drivers/tee/optee/Makefile needs to be updated with:
CFLAGS_call.o := -I$(src)
otherwise the compiler wont know how to find the path to optee_tree.h.
This is described in:
samples/trace_events/Makefile
-- Steve
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Wed, 24 Mar 2021 10:53:13 -0400
Steven Rostedt [off-list ref] wrote:
On Wed, 24 Mar 2021 07:48:53 -0700
Guenter Roeck [off-list ref] wrote:
quoted
On Wed, Mar 24, 2021 at 07:34:07AM -0700, Guenter Roeck wrote:
quoted
On Wed, Feb 10, 2021 at 02:44:09PM +0800, Jisheng Zhang wrote:
quoted
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
arm64:defconfig:
make-arm64 -j drivers/tee/optee/call.o
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CC drivers/tee/optee/call.o
In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
Interesting, I always build linux kernel with "O=", didn't see such build error
and IIRC, we didn't receive any lkp robot build error report.
My steps are:
mkdir /tmp/test
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=/tmp/test defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=/tmp/test drivers/tee/optee/
Today, I tried to build the linux kernel w/o "O=...", I reproduced this error!
This is the first time I saw "O=" make a different behavior.
I'll send out a patch to fix it.
Thanks
quoted
quoted
The problem also affects arm:imx_v6_v7_defconfig.
I think it affects everything. The problem is that the
drivers/tee/optee/Makefile needs to be updated with:
CFLAGS_call.o := -I$(src)
otherwise the compiler wont know how to find the path to optee_tree.h.
This is described in:
samples/trace_events/Makefile
On Thu, Mar 25, 2021 at 3:50 AM Jisheng Zhang
[off-list ref] wrote:
On Wed, 24 Mar 2021 10:53:13 -0400
Steven Rostedt [off-list ref] wrote:
quoted
On Wed, 24 Mar 2021 07:48:53 -0700
Guenter Roeck [off-list ref] wrote:
quoted
On Wed, Mar 24, 2021 at 07:34:07AM -0700, Guenter Roeck wrote:
quoted
On Wed, Feb 10, 2021 at 02:44:09PM +0800, Jisheng Zhang wrote:
quoted
Add tracepoints to retrieve information about the invoke_fn. This would
help to measure how many invoke_fn are triggered and how long it takes
to complete one invoke_fn call.
Signed-off-by: Jisheng Zhang <redacted>
arm64:defconfig:
make-arm64 -j drivers/tee/optee/call.o
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CC drivers/tee/optee/call.o
In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
Interesting, I always build linux kernel with "O=", didn't see such build error
and IIRC, we didn't receive any lkp robot build error report.
My steps are:
mkdir /tmp/test
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=/tmp/test defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=/tmp/test drivers/tee/optee/
Today, I tried to build the linux kernel w/o "O=...", I reproduced this error!
This is the first time I saw "O=" make a different behavior.
I'm also compiling with O=... and couldn't understand what was going
on. Thanks for saving me from digging any deeper.