summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjay Singh Rawat <sanjay.rawat@linaro.org>2014-02-27 10:38:12 +0530
committerJuri Lelli <juri.lelli@gmail.com>2014-02-27 11:18:56 +0100
commit345233b0bf68c9f423d3f51d804265484df85f5d (patch)
treea6ebf556099b273984b32101d53ae91fdb1df112
parent95bc7644c3ea850e6cff59374f4ec8e994b55042 (diff)
log scheduling policy in per thread logs
-rw-r--r--src/rt-app.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rt-app.c b/src/rt-app.c
index 07779b0..bf48f93 100644
--- a/src/rt-app.c
+++ b/src/rt-app.c
@@ -160,6 +160,8 @@ void *thread_body(void *arg)
{
case rr:
case fifo:
+ fprintf(data->log_handler, "# Policy : %s\n",
+ (data->sched_policy == rr ? "SCHED_RR" : "SCHED_FIFO"));
param.sched_priority = data->sched_prio;
ret = pthread_setschedparam(pthread_self(),
data->sched_policy,
@@ -181,6 +183,7 @@ void *thread_body(void *arg)
break;
case other:
+ fprintf(data->log_handler, "# Policy : SCHED_OTHER\n");
log_notice("[%d] starting thread with period: %lu, exec: %lu,"
"deadline: %lu",
data->ind,
@@ -192,6 +195,7 @@ void *thread_body(void *arg)
break;
#ifdef AQUOSA
case aquosa:
+ fprintf(data->log_handler, "# Policy : AQUOSA\n");
data->params.Q_min = round((timespec_to_usec(&data->min_et) * (( 100.0 + data->sched_prio ) / 100)) / (data->fragment * 1.0));
data->params.Q = round((timespec_to_usec(&data->max_et) * (( 100.0 + data->sched_prio ) / 100)) / (data->fragment * 1.0));
data->params.P = round(timespec_to_usec(&data->period) / (data->fragment * 1.0));
@@ -214,6 +218,7 @@ void *thread_body(void *arg)
#endif
#ifdef DLSCHED
case deadline:
+ fprintf(data->log_handler, "# Policy : SCHED_DEADLINE\n");
tid = gettid();
attr.size = sizeof(attr);
attr.sched_flags = 0;