Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/51 Co-authored-by: siddhant <siddhant.singh@neominds.in> Co-committed-by: siddhant <siddhant.singh@neominds.in>
48 lines
903 B
C
48 lines
903 B
C
#ifndef SYS_CALL_STAT
|
|
#define SYS_CALL_STAT
|
|
/*
|
|
uncomment the line below to measure open, close, read,write system calls for 'enc' command.
|
|
*/
|
|
/*#define MEASURE_SYS_CALLS*/
|
|
|
|
#ifdef MEASURE_SYS_CALLS
|
|
#include <vxWorks.h>
|
|
#include <sys/fcntlcom.h>
|
|
#include <semLibCommon.h>
|
|
#include <private/semLibP.h>
|
|
#include <taskLibCommon.h>
|
|
#include "sysLib.h"
|
|
#include "SysCallStat.h"
|
|
#include <tickLib.h>
|
|
#include <stdio.h>
|
|
enum kernelAPI
|
|
{
|
|
openCall=0,
|
|
closeCall,
|
|
readCall,
|
|
writeCall,
|
|
sysCallMax,
|
|
};
|
|
|
|
|
|
typedef struct
|
|
{
|
|
unsigned int sysCallCount;
|
|
unsigned long int execTimeUsec;
|
|
} KRNL_API_STATS;
|
|
|
|
|
|
|
|
|
|
void displayStats();
|
|
void clearSysTableData();
|
|
void sysCallMeasurementTask();
|
|
void CaptureSysCallMetrics();
|
|
extern void sysCallMsrSetData (int flag, TASK_ID tID);
|
|
extern void sysCallMsrGetData (int* flag, TASK_ID* tID);
|
|
TASK_ID sysCallTaskID;
|
|
static SEM_ID sysCallSemID;
|
|
UINT32 tsFreq;
|
|
#endif
|
|
#endif
|