Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Profiler driver
runProf :: [ProfMode] -> InstImage -> DataImage -> String Source
run the profiler
Example: instruction count profile
> runProf [ProfInst] [(0,[MOVI R1 0, MOVI R2 8, ST R1 R2, HALT])] [] instruction profile: MOVI 2 HALT 1 ST 1 total 4
Example: memory store profile
> runProf [ProfStore] [(0,insts)] [] Memory store address profile: address count 0x00000000 1 0x00000001 1 0x00000002 1 0x00000003 1 0x00000004 1 0x00000005 1 0x00000006 1 total 7
Example: branch,jump,call profile
> runProf [ProfBranch] [(0,insts)] [] Branch/Jump/Call target profile: address count 0x00000007 6 total 6 Branch/Jump/Call direction profile: T/N count Taken 6 Not 1 total 7
runProfIO :: [ProfMode] -> InstImage -> DataImage -> IO () Source
run the profiler for IO output
Example:
> runProfIO [ProfInst] [(0,[MOVI R1 0, MOVI R2 8, ST R1 R2, HALT])] [] instruction profile: MOVI 2 HALT 1 ST 1 total 4
prof :: [ProfMode] -> ByteString -> String Source
profile function
Example:
> prof [ProfInst] $ fst $ runDbg [TrcInst] [] [(0,insts)] [] instruction profile: MOVI 2 HALT 1 ST 1 total 4