亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? spylib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* spyLib.c - spy CPU activity library *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------03n,16oct01,jn   use symFindSymbol for symbol lookup (SPR #7453)03m,14mar99,jdi  doc: removed refs to config.h and/or configAll.h (SPR 25663).03l,18sep97,kkk	 fixed typo in spyClkInt() (SPR# 8886), updated copyright.03k,22oct95,jdi  doc: removed references to dbxtool/dbxTask (SPR 4378).03j,12jun95,p_m  updated man pages.03i,27may95,p_m  implemented decoupling of the result display to allow		 host browser spy to run silently.		 Moved spyHelp to usrLib.c.03h,01nov94,kdl  merge cleanup - fixed spyStackSize definition.03g,02dec93,tpr  increased spy stack size for Am29K.03g,02may94,ms   increased stacksize for the simulator.03f,13feb93,kdl  changed cplusLib.h to private/cplusLibP.h (SPR #1917).03e,20jan93,jdi  documentation cleanup for 5.1.03d,31oct92,jcf  increased spy stack size for 68k.03c,31oct92,ccc  increased spy stack size for I960.03b,04aug92,ajm  fixed define of nameToPrint to be char *03a,01aug92,srh  added C++ demangling idiom to spyReport02z,30jul92,smb  changed format for printf to avoid zero padding.02y,04jul92,jcf  scalable/ANSI/cleanup effort.02x,26may92,rrr  the tree shuffle02w,22apr92,jwt  converted CPU==SPARC to CPU_FAMILY==SPARC; copyright.02v,23mar92,jmm  changed spyClkStart and spyReport to check for null ptrs                 SPR #138402u,19nov91,rrr  shut up some ansi warnings.02t,15oct91,ajm  modified spy stack size for MIPS too02s,15oct91,jwt  02q merge never did initialize auxClkTickPerSecond to 60.02r,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed VOID to void		  -changed copyright notice02q,23may91,jwt  modified spy stack size, init auxClkTickPerSecond for SPARC.02p,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by shl.02o,24mar91,jdi  documentation cleanup.02n,10aug90,dnw  added forward declaration of spyTaskIdListSort().02m,28jun90,shl  cleared sysKernelTicks and sysKernelIncTicks in sysSpyStart().02l,21jun90,shl	 added task names and priorities to spy report,		 display of tasks now ordered by priority.		 added spyTaskIdListSort().	         set auxClkRate back to its original value after spyStop().		 replaced sysAuxClkDisconnect() by sysAuxClkDisable().02k,14apr90,jcf  remove tcbx dependencies		 added kernel state time.		 changed name of spyTask to tSpyTask.02j,19mar90,jdi  documentation cleanup.02i,20aug88,gae  documentation.02h,22jun88,dnw  name tweaks.		 clean-up.02g,07jun88,gae  added call to sysClkEnable ().02f,06jun88,dnw  changed taskSpawn/taskCreate args.02e,04jun88,gae  changed spyStart() to spyClkStart().		 added spyClkStop().02c,30may88,dnw  changed to v4 names.02b,24mar88,gae  fixed spyReport() formatting, % calculations, prints		   out tasks that have no ticks & newly created tasks.		 fixed bugs allowing multiple spy's & extra delete hooks.02a,07mar88,gae  made it work with generic kernel -- does not use		   static array for tasks.		 Renamed module and all routines to "spy".		 Added spy{Create,Delete}Task() to correctly handle		   variable number of tasks between reports.01i,04nov87,ecs  documentation.01h,02apr87,ecs  eased lint's mind in taReport.01g,23mar87,jlf  documentation.01f,20feb87,jlf  made taStart check the parameter returned by		   sysAuxClkConnect, to determine whether the board has		   an aux clock on it.01e,21dec86,dnw  changed to not get include files from default directories.01d,19nov86,llk  Added spyTask.01c,06nov86,jlf  Changed to use new CPU-independent routines, sysAuxClk...01b,24oct85,dnw  changed taSpy to explicity spawn periodRun since default		   parameters supplied by period, weren't adequate.01a,22oct85,jlf  written.*//*DESCRIPTIONThis library provides a facility to monitor tasks' use of the CPU.The primary interface routine, spy(), periodically calls spyReport() todisplay the amount of CPU time utilized by each task, the amount of timespent at interrupt level, the amount of time spent in the kernel, and theamount of idle time.  It also displays the total usage since the start ofspy() (or the last call to spyClkStart()), and the change in usage sincethe last spyReport().CPU usage can also be monitored manually by calling spyClkStart() andspyReport(), instead of spy().  In this case, spyReport() provides a one-timereport of the same information provided by spy().Data is gathered by an interrupt-level routine that is connected byspyClkStart() to the auxiliary clock.  Currently, this facility cannot beused with CPUs that have no auxiliary clock.  Interrupts that are at ahigher level than the auxiliary clock's interrupt level cannot bemonitored.All user interface routine except spyLibInit() are available through usrLib.EXAMPLEThe following call:.CS    -> spy 10, 200.CEwill generate a report in the following format every 10 seconds,gathering data at the rate of 200 times per second..CS.ne 5\&NAME          ENTRY       TID   PRI  total % (ticks)  delta % (ticks)\&--------     --------    -----  ---  ---------------  ---------------\&tExcTask     _excTask    fbb58    0    0% (       0)    0% (       0)\&tLogTask     _logTask    fa6e0    0    0% (       0)    0% (       0)\&tShell       _shell      e28a8    1    0% (       4)    0% (       0)\&tRlogind     _rlogind    f08dc    2    0% (       0)    0% (       0)\&tRlogOutTask _rlogOutTa  e93e0    2    2% (     173)    2% (      46)\&tRlogInTask  _rlogInTas  e7f10    2    0% (       0)    0% (       0)\&tSpyTask     _spyTask    ffe9c    5    1% (     116)    1% (      28)\&tNetTask     _netTask    f3e2c   50    0% (       4)    0% (       1)\&tPortmapd    _portmapd   ef240  100    0% (       0)    0% (       0)\&KERNEL                                 1% (     105)    0% (      10)\&INTERRUPT                              0% (       0)    0% (       0)\&IDLE                                  95% (    7990)   95% (    1998)\&TOTAL                                 99% (    8337)   98% (    2083).CEThe "total" column reflects CPU activity since the initial call to spy()or the last call to spyClkStart().  The "delta" column reflects activitysince the previous report.  A call to spyReport() will produce a singlereport; however, the initial auxiliary clock interrupts and data collectionmust first be started using spyClkStart().Data collection/clock interrupts and periodic reporting are stopped bycalling:.CS    -> spyStop.CEINCLUDE FILES: spyLib.hSEE ALSO: usrLib*/#include "vxWorks.h"#include "sysSymTbl.h"#include "sysLib.h"#include "taskHookLib.h"#include "logLib.h"#include "stdio.h"#include "intLib.h"#include "spyLib.h"#include "private/cplusLibP.h"#include "private/windLibP.h"#define MAX_SPY_TASKS	200		/* max tasks that can be spy'd *//* spyTask parameters */int spyTaskId		= ERROR;	/* ERROR = spy task not active */int spyTaskOptions	= VX_UNBREAKABLE;int spyTaskPriority	= 5;#if	((CPU_FAMILY==SPARC) || (CPU_FAMILY==MIPS) || (CPU_FAMILY==I960) || \	 (CPU_FAMILY== AM29XXX)  ||  (CPU_FAMILY== SIMSPARCSUNOS) || \	 (CPU_FAMILY==SIMHPPA))int spyTaskStackSize	= 10000;#elseint spyTaskStackSize	= 6000;#endif	/* CPU_FAMILY==SPARC || CPU_FAMILY==MIPS || CPU_FAMILY==I960 ... *//* global variables *//*  * The variables below must remain declared in the order they are declared  * here since they are read by host tools using gopher. */UINT spyTotalTicks;			/* all ticks since start */UINT spyIncTicks;			/* all ticks since last report */UINT spyInterruptTicks;			/* int ticks since start */UINT spyInterruptIncTicks;		/* int ticks since last report */UINT spyKernelTicks;			/* int ticks since start */UINT spyKernelIncTicks;			/* int ticks since last report */UINT spyIdleTicks;			/* idle ticks since start */UINT spyIdleIncTicks;			/* idle ticks since last report*//* local variables */LOCAL BOOL spyClkRunning;		/* TRUE = spyClkStart'ed */LOCAL BOOL spyInitialized;		/* TRUE = hooks installed */LOCAL int  spyCreateCount;		/* num tasks created since report */LOCAL int  spyDeleteCount;		/* num tasks deleted since report */#if	CPU_FAMILY==SPARCLOCAL int  auxClkTicksPerSecond = 60;#else	/* CPU_FAMILY==SPARC */LOCAL int  auxClkTicksPerSecond;#endif	/* CPU_FAMILY==SPARC *//* display formats */LOCAL char *spyFmt1 = "%-12.12s %-10.10s %8x  %3d   %3d%% (%8d)  %3d%% (%8d)\n";LOCAL char *spyFmt2 = "%-12.12s %-10.10s %8s  %3s   %3d%% (%8d)  %3d%% (%8d)\n";/* forward static functions */static void spyCreateHook (WIND_TCB *pTcb);static void spyDeleteHook (WIND_TCB *pTcb);static void spyClkInt (void);static void spyTaskIdListSort (int idList [ ], int nTasks);/********************************************************************************* spyLibInit - initialize task cpu utilization tool package** This routine initializes the task cpu utilization tool package.  * If the configuration macro INCLUDE_SPY is defined, it is called by the root * task, usrRoot(), in usrConfig.c.** RETURNS: N/A** SEE ALSO: usrLib*/void spyLibInit (void)    {    _func_spy		= (FUNCPTR) spyCommon;    _func_spyStop	= (FUNCPTR) spyStopCommon;    _func_spyClkStart 	= (FUNCPTR) spyClkStartCommon;    _func_spyClkStop 	= (FUNCPTR) spyClkStopCommon;    _func_spyTask 	= (FUNCPTR) spyComTask;    _func_spyReport	= (FUNCPTR) spyReportCommon;    }/********************************************************************************* spyCreateHook - initialize task tick counters** This routine is installed as a task create hook so that the task tick* counters can be initialized and spyReport() can indicate when new tasks* appear between reports.** RETURNS: N/A*/LOCAL void spyCreateHook    (    WIND_TCB *pTcb      /* WIND_TCB of new task */    )    {    pTcb->taskTicks    = 0;    pTcb->taskIncTicks = 0;    spyCreateCount++;    }/********************************************************************************* spyDeleteHook - notify spyLib of task deletion** This routine is installed as a task delete hook so that spyReport()* can indicate when tasks disappear between reports.** RETURNS: N/A** ARGSUSED*/LOCAL void spyDeleteHook    (    WIND_TCB *pTcb      /* WIND_TCB of new task */    )    {    spyDeleteCount++;    }/********************************************************************************* spyClkInt - spyLib interrupt service routine** This routine is called at each tick of the auxiliary clock.  When at* interrupt level the interrupt tick count is incremented.  If there is no* active task then the idle tick count is incremented, otherwise increment* the active task's tick counter.** RETURNS: N/A*/LOCAL void spyClkInt (void)    {    if (intCount () > 1)		/* we interrupted an interrupt */	spyInterruptIncTicks++;    else if (kernelIsIdle)		/* we interrupted idle state */	spyIdleIncTicks++;    else if (kernelState)		/* we interrupted the kernel */	spyKernelIncTicks++;    else	{	if (taskIsReady ((int) taskIdCurrent))	    taskIdCurrent->taskIncTicks++;	else	    logMsg ("spyClkInt: taskIdCurrent not ready.\n",0,0,0,0,0,0);	}    spyIncTicks++;    }/********************************************************************************* spyClkStartCommon - start collecting task activity data** This routine begins data collection by enabling the auxiliary clock* interrupts at a frequency of <intsPerSec> interrupts per second.  If* <intsPerSec> is omitted or zero, the frequency will be 100.  Data from* previous collections is cleared.** RETURNS:* OK, or ERROR if the CPU has no auxiliary clock, or if task create and* delete hooks cannot be installed.** SEE ALSO: sysAuxClkConnect()** NOMANUAL*/STATUS spyClkStartCommon    (    int		intsPerSec,	/* timer interrupt freq, 0 = default of 100 */    FUNCPTR	printRtn	/* routine to display result */    )    {    FAST int ix;    FAST int nTasks;    FAST WIND_TCB *pTcb;    int idList [MAX_SPY_TASKS];    if (spyClkRunning)	return (ERROR);		/* We're already going */    if ((_func_taskCreateHookAdd != NULL) && (_func_taskDeleteHookAdd != NULL))	{	if (!spyInitialized &&	    ((* _func_taskCreateHookAdd) ((FUNCPTR)spyCreateHook) == ERROR ||	     (* _func_taskDeleteHookAdd) ((FUNCPTR)spyDeleteHook) == ERROR))	    {	    if (printRtn != NULL)		(* printRtn) ("Unable to add create/delete hooks.\n");	    return (ERROR);	    }	}    spyInitialized = TRUE;    if (intsPerSec == 0)	intsPerSec = 100;    spyDeleteCount  = 0;    spyCreateCount  = 0;    spyTotalTicks = spyIdleTicks  = spyKernelTicks    = spyInterruptTicks    =0;    spyIncTicks = spyIdleIncTicks = spyKernelIncTicks = spyInterruptIncTicks =0;    /* initialize tick counters of tasks already running */    nTasks = taskIdListGet (idList, NELEMENTS (idList));    for (ix = 0; ix < nTasks; ++ix)	{	pTcb = taskTcb (idList [ix]);	/*	 * Need to make sure pTcb is a valid pointer	 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合色自拍一区| 日韩一级二级三级精品视频| 免费高清在线视频一区·| 洋洋成人永久网站入口| 国产精品久久夜| 日韩一区在线免费观看| 亚洲欧洲99久久| 亚洲美女屁股眼交3| 亚洲精品日韩综合观看成人91| 亚洲色图.com| 亚洲在线成人精品| 日韩电影免费在线| 国产在线精品不卡| 不卡电影一区二区三区| 色婷婷亚洲婷婷| 欧美巨大另类极品videosbest | eeuss鲁片一区二区三区 | 欧美一区二区免费观在线| 91精品在线观看入口| 欧美一级视频精品观看| 久久麻豆一区二区| 国产精品国产三级国产aⅴ中文 | 奇米影视在线99精品| 久久66热偷产精品| gogo大胆日本视频一区| 欧美亚洲图片小说| 精品剧情在线观看| 久久久精品天堂| 亚洲精品日日夜夜| 久久99精品国产麻豆婷婷| 成人深夜在线观看| 欧美高清你懂得| 欧美国产成人精品| 七七婷婷婷婷精品国产| 成人一道本在线| 8x8x8国产精品| 亚洲三级在线播放| 美女视频黄久久| 91久久精品国产91性色tv| 日韩欧美国产综合在线一区二区三区 | 欧美巨大另类极品videosbest | 欧美三级电影网| 亚洲精品在线观| 一区二区三区免费| 高清不卡一区二区| 欧美一级搡bbbb搡bbbb| 成人免费在线播放视频| 日韩成人免费电影| 色综合久久久久综合99| 久久久久久久久久美女| 日韩在线一二三区| 日本二三区不卡| 日本一区二区三区久久久久久久久不| 午夜视频久久久久久| 色欧美日韩亚洲| 久久久精品免费观看| 毛片av一区二区| 欧美日本一区二区三区四区| 亚洲欧美日韩在线不卡| www.色精品| 国产拍欧美日韩视频二区| 极品少妇一区二区| 日韩欧美的一区二区| 首页国产欧美日韩丝袜| 欧美日韩色一区| 亚洲另类一区二区| 色噜噜偷拍精品综合在线| 国产精品入口麻豆原神| 国产夫妻精品视频| 久久久久久久av麻豆果冻| 美国毛片一区二区三区| 欧美一区二区高清| 精品亚洲免费视频| 日韩精品一区二区三区中文不卡| 丝袜诱惑制服诱惑色一区在线观看 | 欧美性猛交xxxx黑人交| 亚洲精品亚洲人成人网| 色婷婷激情综合| 亚洲精品久久久蜜桃| 在线观看一区日韩| 午夜电影网亚洲视频| 欧美日韩中字一区| 日韩电影免费在线看| 日韩精品综合一本久道在线视频| 麻豆视频一区二区| 久久视频一区二区| 99riav一区二区三区| 一区二区三区国产| 欧美一级在线视频| 国产福利91精品| 一区二区三区欧美激情| 欧美裸体一区二区三区| 另类小说欧美激情| 国产亲近乱来精品视频| 在线精品视频一区二区| 日精品一区二区三区| 精品国产自在久精品国产| 国产成人午夜电影网| 亚洲精品福利视频网站| 7777精品伊人久久久大香线蕉| 久久精品国产久精国产| 国产精品无遮挡| 欧美日韩色一区| 粉嫩av一区二区三区| 亚洲一区二区三区在线看| 日韩欧美国产不卡| 色女孩综合影院| 国产一区二区三区四区五区入口 | 91精品福利在线一区二区三区| 久久精品二区亚洲w码| 亚洲欧美日韩中文播放| 欧美精品一区二区三区蜜臀| 91丝袜呻吟高潮美腿白嫩在线观看| 天天综合天天做天天综合| 国产欧美一区视频| 欧美日本一道本| 国产成人高清视频| 日本午夜精品一区二区三区电影| 国产精品日韩成人| 欧美精品一区二区高清在线观看| 91一区在线观看| 国产一区二区三区日韩| 亚洲国产精品久久一线不卡| 欧美韩国一区二区| 精品精品国产高清一毛片一天堂| 色综合天天在线| 国产精品影视天天线| 无吗不卡中文字幕| 一区二区三区四区五区视频在线观看| 久久午夜色播影院免费高清| 欧美日韩成人一区二区| 91美女视频网站| 国产ts人妖一区二区| 老司机精品视频在线| 日韩高清电影一区| 亚洲一二三区不卡| 综合久久久久久| 欧美国产日产图区| 国产日产欧美精品一区二区三区| 在线成人免费观看| 欧美日韩亚洲综合在线 | 国产精品一区一区三区| 蜜乳av一区二区| 亚洲观看高清完整版在线观看| 国产精品福利电影一区二区三区四区 | 欧美日韩在线电影| 色爱区综合激月婷婷| 波多野结衣在线一区| 国产裸体歌舞团一区二区| 麻豆免费精品视频| 久久精品国产99国产精品| 免费视频最近日韩| 九九精品一区二区| 国产精品一区二区在线播放| 国产综合一区二区| 丁香啪啪综合成人亚洲小说| 国产精品一区二区男女羞羞无遮挡| 久久精工是国产品牌吗| 国产综合成人久久大片91| 激情亚洲综合在线| 国产精品主播直播| 成人av在线观| 一本大道综合伊人精品热热| 一本大道av伊人久久综合| 欧美亚洲一区二区在线| 欧美一卡二卡三卡四卡| 337p日本欧洲亚洲大胆精品| 久久久.com| 亚洲人午夜精品天堂一二香蕉| 亚洲欧美日韩小说| 日韩精品国产精品| 国产一区二区三区av电影| 成人免费观看视频| 在线观看日韩精品| 精品少妇一区二区三区视频免付费 | 久久综合丝袜日本网| 国产精品美女www爽爽爽| 亚洲福利视频一区二区| 国产在线观看一区二区| 99re这里只有精品首页| 欧美一级黄色大片| 国产精品系列在线| 日韩精品亚洲专区| av在线播放一区二区三区| 欧美日韩国产天堂| 亚洲国产精品精华液2区45| 亚洲综合无码一区二区| 国产精品综合在线视频| 欧美三级日韩在线| 国产欧美日韩在线视频| 污片在线观看一区二区| 国产精品一区二区你懂的| 欧美乱妇15p| 亚洲欧洲色图综合| 久久99久久99精品免视看婷婷| 久久日韩粉嫩一区二区三区 | 亚洲午夜视频在线观看| 肉丝袜脚交视频一区二区| 国产麻豆视频一区二区| 欧美日韩综合在线免费观看|