Home
S.Ha.R.K. User Manual Volume V *** DRAFT *** The S.Ha.R.K. New
Contents
1. TRACER LOGEVENT FTrace EVT trace start proc table exec shadow context clk per msec for i 0 i lt 10 i if proc table i context 0 TRACER LOGEVENT FTrace EVT id unsigned short int proc table i context i do something Enable filtering for timer related events FTrace set filter FTrace filter timer 0 Change the chunk where the events are stored TRACER LOGEVENT FTrace_EVT_next_chunk 0 0 TRACER LOGEVENT FTrace EVT ipoint 6000 0 do something Store a TFrace stop event TRACER LOGEVENT FTrace EVT trace stop 0 0 Stop the tracer FTrace disable Initialize the network for remotely saving the trace FTrace O0SD init udp 1 192 168 1 10 192 168 1 1 If want to save the events to disk simply change the network initialization instruction with the following line FTrace_init_disk_writer trace dat 0 NULL NULL Save the chunk FTrace send chunk a 0 FTRACE CHUNK FLAG FREE FTRACE CHUNK FLAG CYC FTrace send chunk b 0 FTRACE CHUNK FLAG FREE FTRACE CHUNK FLAG JTN 13 Chapter 5 Tracer output When the trace is saved locally or remotely into a file the resulting binary file appears as a sequence of bytes where each event stored within the trace output file is 16 bytes long The format of each single event is depicted in Table 5 1 The fields have the following meaning e the Cod
2. sever 0x18 server FTrace_EVT server exhaust 0x28 server Trace EVT server redaimimg 0x38 __ server as sewer Frac EVT server active 0x58 server 0x68 Table 3 9 Specific server events 0x9 x49 0x69 x89 OxBO OxD9 Ox Table 3 10 User defined events 10 FTrace EVT timer post wB Flrae EVT timer delete O0xB __ FTrace_EVT_ timer wakeup start 0x2B Fiac EVT time wakeup end 038 cea 7 Table 3 11 Timer events FIrace EVT data pointer holds a pointer of data from FTrace EVT next chunk previous event Table 3 12 Generic data events Table 3 13 Filter management 11 Chapter 4 Example of Tracer usage Algorithm 1 Example of Tracer usage Declarations int a b c SYS FLAGS f Create 3 chunks for storing the tracer events a FTrace chunk create 1000000 1000000 FTRACE CHUNK FLAG FREE FTRACE CHUNK FLAG CYO b FTrace chunk create 1000000 1000000 FTRACE CHUNK FLAG FREE FTRACE CHUNK FLAG JTN c FTrace chunk create 1000000 1000000 FTRACE CHUNK FLAG FREE FTRACE CHUNK FLAG CYC FTrace chunk link a b FTrace chunk link b c Select the first chunk for saving the events FTrace actual chunk select a Start the tracer FTrace enable Enable filtering for timer related events FTrace set filter FTrace filter timer 1
3. S Ha R K User Manual Volume V The S Ha R K New Tracer Written by Tullio Facchinetti tullio facchinettiQunipv it Scuola Superiore di Studi e Perfezionamento S Anna RETIS Lab Via Carducci 40 56100 Pisa Contents 1 The S Ha R K tracer A 2 Primitives 2 1 F Irace enable 2 2 ETrace disable e yo Rm met De mutant et OU A Ee EUR des il 2 3 Trace chunk create corras EUR PRE A E 2 4 Filtace chunk delete 4 ue p A Ron dod ee 2 5 FTrace set chunk flags 2 6 ETrace get chunk Maps 550 e e et SS dete ds see ee euh 2 7 F Irace actual chunk select LL 2 5 ETrace chunk nk 2 2 Re Ede deed q ox Eu NN Ere e EE 2 9 Flrace pet first chunk ci ce Rom m Rees XE A eee de od mu 2 10 FTrace get chunk table 2 11 FTrace compress chunk 2 12 FTrace send chunk 2 13 F Irace init disk writer 2 14 FTrace disk writer 2 16 ETrace OSD init Gdp ee dae og p REP Rex ek RR RE 2406 F Trace set filter eise uou ox ee de or 9 E USUS 2 17 TRACER EOGEVEN T ie a RE a E G T d d d d4 OO OS O OY O Ct O a a a Gt 00 3 Event types description 4 Example of Tracer usage 12 5 Tracer output 14 Chapter 1 The S Ha R K tracer The S Ha R K new Tracer is a powerful tool to und
4. VT task activate FTrace EV T task dispatch ir il FTrace EV T task epilogue FTrace EVT task end context FTrace EVI task begin cycle a FTrace EVI task end cycle re di 34 exec context A eo N E inr o o ra PS eue N N c Pi I N FTrace EVT task sleep exec shadow context exec context FTrace EVT task timer FTrace EVT task disable FTrace EVT task deadline miss context FTrace EVT task wcet violation 0xC2 context a Oo N FTrace_EVT_task schedule e N e a E N Table 3 3 Task related events FTrace EVI imerrupt start 0x03 ES ods mt 0x33 Table 3 4 Interrupt events even more lightweight than ipoints Parameter 1 Flrace EVT to real mode oot T A FIrace EVT to proteded mode x14 Flrace EVI CLI FTrace EVT STI Table 3 5 Other CPU specific events FTrace EVT set priority FTrace_EVT_context_switch 0x15 come __ FTrace EVT inheritance 0x25 exec shadow context Table 3 6 Changes on task attributes and state FTrace EVT set mutex create x06 Trace EVT set mutex inherit 026 gt F Trace EVT sci mutex unlock Face EVI set mutex wall FTrace EVT set mutex post 0x56 Table 3 7 Mutex events Frac EVT signal 0x07 Table 3 8 Signal events FTrac EVI server create 0x08
5. disk It saves the chunk data into the chunk to disk array At the runlevel after the exit all the saved chunks will be written to disk 2 15 FTrace OSD init udp int FTrace OSD init udp int flag char 1 ip char t ip Initialize the Tracer chunk network sender using the UDP protocol supported by S Ha R K If flag 1 initializes the network driver otherwise it considers that the network layer has already been initialized It also sets the internal chunk sender to the function that initializes the task for sending the chunk 2 16 FTrace set filter void FTrace set filter BYTE family int status Set the filter for a specific family of events see Table 3 13 for a list of all the event families When the filter is enabled for a given family of events all the events belonging to that family are not logged While status set to 1 enables the filter status set to 0 disables the filter 2 17 TRACER LOGEVENT TRACER_LOGEVENT WORD type WORD pari DWORD par2 Stores a new event of type type into the current chunk together with the 2 parameters par1 2 bytes and par2 4 bytes Chapter 3 Event types description This Chapter reports all the available event type codes currently supported by S Ha R K 0x10 FTrace EVT blackout end FTrace EVT id 7 FTrace EVT numevents Table 3 1 General trace events FTrace_EVT_ipoint 0x01 Table 3 2 Lightweight tracing events FTrace EVI task create context FTrace E
6. e chunk delete int number Delete a Chunk 2 5 F Trace set chunk flags int FTrace set chunk flags int number FTrace flags flags Set the chunk flags 2 6 FTrace get chunk flags int FTrace get chunk flags int number FTrace flags flags Returns chunk flags 2 7 F Irace actual chunk select int FTrace actual chunk select int number Select the actual chunk 2 8 F Trace chunk link int FTrace chunk link int chunk A int chunk B Link two chunks 2 9 FTrace get first chunk int FTrace get first chunk FTrace flags flags Find the first chunk with specific flags 2 10 FTrace get chunk table FTrace Chunk Ptr FTrace get chunk table Get one chunks status 2 11 F Irace compress chunk int FTrace compress chunk int number FTrace flags new flags Create a new memory region where the compressed data are stored 2 12 FTrace send chunk int FTrace send chunk int number int osd flags FTrace flags new flags Send the chunk out from the memory 2 13 FTrace init disk writer int FTrace init disk writer char fname int flag char 1 ip char t ip Initialize the disk Tracer chunk dumper It sets the internal chunk sender to the function that writes chunks on disk It initializes the filename that will be used to open the file for saving chunks 2 14 F Trace disk writer void FTrace disk writer FTrace Chunk Ptr c This function is called by the application when it asks to write chunk c on
7. e represent the event type see Chapter 3 for the full list e Parameter 1 and 2 are the parameters used when TRACER_LOGEVENT is invoked e TSC is the Time Stamp Counter associated with the event If prt points to the first byte of an event the correct TSC value can be obtained with the following instructions unsigned long long tsc_value tsc value unsigned long long unsigned int ptr 4 lt lt 32 tsc value unsigned long long unsigned int ptr 8 TSC high part TSC ow part Table 5 1 Event output file format 14
8. erstand what happens while a S Ha R K application is executed The Tracer logs a set of events corresponding with the most impor tant activities within the kernel such as preemptions interrupt activations mutexes blocks and releases and much more During the execution the kernel logs the sequence of events in memory such events are then written to disk or sent through the network typically at the end of the application execution Each event is made by a high resolution timestamp TSC Time Stamp Counter corresponding to the instant at which the event has been logged the event type 2 optional parameters to add additional information to the event The Tracer can also be used to log custom events since it reserves a number of free event types for user events To use the features made available by the Tracer the Tracer functions must be enabled into the kernel by specifying TRACER NEW into the shark cfg configuration file The S Ha R K kernel must be built with this option set Chapter 2 Primitives 2 1 FTrace enable int FTrace enable Enable the Tracer When this function is called the Tracer starts the event logging 2 2 F Trace disable int FTrace disable Disable the Tracer When this function is called the Tracer stops the event logging 2 3 F Irace chunk create int FTrace chunk create int normal size int emergency size FTrace flags flags Create a new chunk 2 4 F Irace chunk delete int FTrac
Download Pdf Manuals
Related Search
Related Contents
ヒーリングDVD概説書 - ほおじろえいいち オフィシャルサイト LUMINARIA PARA EXTERIORES MOD. ILU605114 Genius KM-G230 Gemmy 37631 Instructions / Assembly biblio outils nutrition saverne existant1 Küschall® Advance™ Massive Ceiling light 30050/56/10 tinyTesla User Manual Guide d`utilisation 2673 T'nB UTABORNY Copyright © All rights reserved.
Failed to retrieve file