Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/tTraceLog.c

    r331 r429  
    55 *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
    66 *                              Toyohashi Univ. of Technology, JAPAN
    7  *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
     7 *  Copyright (C) 2005-2019 by Embedded and Real-Time Systems Laboratory
    88 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    99 *
     
    4848#include "kernel/task.h"
    4949#include "kernel/time_event.h"
     50#ifdef TOPPERS_SUPPORT_PROTECT
     51#include "kernel/domain.h"
     52#endif /* TOPPERS_SUPPORT_PROTECT */
    5053#include <sil.h>
    5154#include <log_output.h>
     
    5659 *
    5760 *  デフォルトでは,ログ時刻として,高分解能タイマのカウント値を用いて
    58  *  いる.ターゲット依存で変更する場合には,SYSLOG_GET_LOGTIMに,ログ時
     61 *  いる.ターゲット依存で変更する場合には,TRACE_GET_LOGTIMに,ログ時
    5962 *  刻を取り出すマクロを定義する.
    6063 */
    61 #ifndef SYSLOG_GET_LOGTIM
    62 #define SYSLOG_GET_LOGTIM(p_logtim) \
     64#ifndef TRACE_GET_LOGTIM
     65#define TRACE_GET_LOGTIM(p_logtim) \
    6366                                (*(p_logtim) = target_hrt_get_current())
    64 #endif /* SYSLOG_GET_TIM */
    65 
    66 /*
    67  *  トレースログの開始
     67#endif /* TRACE_GET_TIM */
     68
     69/*
     70 *  トレースログの開始(受け口関数)
    6871 */
    6972ER
     
    8184
    8285/*
    83  *  トレースログの書込み
     86 *  トレースログの書込み(受け口関数)
    8487 */
    8588ER
     
    9497                 *  トレース時刻の設定
    9598                 */
    96                 SYSLOG_GET_LOGTIM(&(((SYSLOG *) p_trace)->logtim));
     99                TRACE_GET_LOGTIM(&(((SYSLOG *) p_trace)->logtim));
    97100
    98101                /*
     
    121124
    122125/*
    123  *  トレースログの読出し
     126 *  トレースログの読出し(受け口関数)
    124127 */
    125128ER
     
    203206        p_tcb = (TCB *) info;
    204207        if (p_tcb == NULL) {
    205                 tskid = 0;
     208                tskid = TSK_NONE;
    206209        }
    207210        else {
     
    240243}
    241244
     245#ifdef TOPPERS_SUPPORT_PROTECT
     246
     247static intptr_t
     248get_somid(intptr_t info)
     249{
     250        SOMINIB *p_sominib;
     251        ID              somid;
     252
     253        p_sominib = (SOMINIB *) info;
     254        if (p_sominib == NULL) {
     255                somid = TSOM_STP;
     256        }
     257        else {
     258                somid = SOMID(p_sominib);
     259        }
     260        return((intptr_t) somid);
     261}
     262
     263static intptr_t
     264get_twd_domid(intptr_t info)
     265{
     266        TWDINIB *p_twdinib;
     267        ID              domid;
     268
     269        p_twdinib = (TWDINIB *) info;
     270        domid = (ID)(p_twdinib->p_dominib - dominib_table) + TMIN_DOMID;
     271        return((intptr_t) domid);
     272}
     273
     274#endif /* TOPPERS_SUPPORT_PROTECT */
     275
    242276/*
    243277 *  トレースログの表示
     
    267301                tracemsg = "dispatch to task %d.";
    268302                break;
     303
     304#ifdef TOPPERS_SUPPORT_PROTECT
     305        case LOG_TYPE_SCYC|LOG_START:
     306                traceinfo[0] = get_somid(p_trace->logpar[0]);
     307                tracemsg = "system cycle starts with system operating mode %d.";
     308                break;
     309        case LOG_TYPE_TWD|LOG_START:
     310                if (p_trace->logpar[0] == 0) {
     311                        tracemsg = "idle window starts.";
     312                }
     313                else {
     314                        traceinfo[0] = get_twd_domid(p_trace->logpar[0]);
     315                        tracemsg = "time window for domain %d starts.";
     316                }
     317                break;
     318#endif /* TOPPERS_SUPPORT_PROTECT */
     319
    269320        case LOG_TYPE_COMMENT:
    270321                for (i = 1; i < TNUM_LOGPAR; i++) {
     
    313364}
    314365
    315 /* 
    316  *  トレースログのダンプ
    317  */
    318 void
    319 eTraceLog_dump(void)
     366/*
     367 *  トレースログのダンプ(受け口関数)
     368 */
     369void
     370eDump_main(uintptr_t exinf)
    320371{
    321372        TRACE   trace;
     
    325376        }
    326377}
    327 
    328 /*
    329  *  トレースログのダンプ(受け口関数)
    330  */
    331 void
    332 tTraceLog_eDump_main(uintptr_t exinf)
    333 {
    334         eTraceLog_dump();
    335 }
Note: See TracChangeset for help on using the changeset viewer.