Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xtest: add command to get system time #694

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

weizhaojiang
Copy link
Contributor

Command format: xtest --stats --time

Tested-by: Weizhao Jiang weizhaoj@amazon.com

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

op.paramTypes = TEEC_PARAM_TYPES(TEEC_VALUE_OUTPUT,
TEEC_VALUE_OUTPUT,
TEEC_NONE, TEEC_NONE);
res = TEEC_InvokeCommand(&sess, STATS_CMD_SYSTEM_TIME, &op, &eo);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command could be implemented in the "OS test" TA (ta/os_test/os_test.c).

Copy link
Contributor Author

@weizhaojiang weizhaojiang Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command could be implemented in the "OS test" TA (ta/os_test/os_test.c).

Thanks for your comment. It seems "OS test" TA hasn't been included into our real product. Can we keep it in stats PTA?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command could be implemented in the "OS test" TA (ta/os_test/os_test.c).

It is worth creating a new xtest --os-test [ARGS] interface rather than using existing --stats entries and related PTA_STATS, to print these kind of core state info?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ignore my suggestion, we'll keep the thing in the stats PTA.

Copy link
Contributor

@jforissier jforissier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of suggestions below, then:

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>


printf("REE time: %"PRId32" Seconds, %"PRId32" Milliseconds\n",
op.params[0].value.a, op.params[0].value.b);
printf("TEE time: %"PRId32" Seconds, %"PRId32" Milliseconds\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular reason for capitalizing Seconds and Milliseconds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

host/xtest/stats.c Outdated Show resolved Hide resolved
Command format: xtest --stats --time

Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Weizhao Jiang <weizhaoj@amazon.com>
Signed-off-by: Weizhao Jiang <weizhaoj@amazon.com>
@jforissier jforissier merged commit b49d696 into OP-TEE:master Sep 28, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants