| Copyright | (c) Galois Inc 2018 |
|---|---|
| License | BSD3 |
| Maintainer | Rob Dockins <rdockins@galois.com> |
| Stability | provisional |
| Safe Haskell | None |
| Language | Haskell2010 |
Lang.Crucible.Simulator.Profiling
Contents
Description
Synopsis
- profilingFeature :: ProfilingTable -> EventFilter -> Maybe ProfilingOptions -> IO (GenericExecutionFeature sym)
- data ProfilingOptions = ProfilingOptions {}
- data EventFilter = EventFilter {}
- profilingEventFilter :: EventFilter
- newProfilingTable :: IO ProfilingTable
- recordSolverEvent :: ProfilingTable -> SolverEvent -> IO ()
- startRecordingSolverEvents :: IsSymInterface sym => sym -> ProfilingTable -> IO ()
- enterEvent :: ProfilingTable -> FunctionName -> Maybe ProgramLoc -> IO ()
- exitEvent :: ProfilingTable -> FunctionName -> IO ()
- inProfilingFrame :: ProfilingTable -> FunctionName -> Maybe ProgramLoc -> IO a -> IO a
- readMetrics :: ProfilingTable -> IO (Metrics Identity)
- data CrucibleProfile = CrucibleProfile {}
- readProfilingState :: ProfilingTable -> IO (UTCTime, [CGEvent], [(UTCTime, SolverEvent)])
- writeProfileReport :: FilePath -> String -> String -> ProfilingTable -> IO ()
- data CGEvent = CGEvent {}
- data CGEventType
- data ProfilingTable = ProfilingTable {
- callGraphEvents :: IORef (Seq CGEvent)
- eventDedups :: IORef (HashSet EventDedup)
- metrics :: Metrics IORef
- eventIDRef :: IORef Integer
- solverEvents :: IORef (Seq (UTCTime, SolverEvent))
- newtype Metric p sym ext = Metric {}
- data Metrics (f :: Type -> Type) = Metrics {
- metricSplits :: f Integer
- metricMerges :: f Integer
- metricAborts :: f Integer
- metricSolverStats :: f Statistics
- metricExtraMetrics :: f (Map Text Integer)
- symProUIJSON :: String -> String -> ProfilingTable -> IO JSValue
- symProUIString :: String -> String -> ProfilingTable -> IO String
Documentation
profilingFeature :: ProfilingTable -> EventFilter -> Maybe ProfilingOptions -> IO (GenericExecutionFeature sym) Source #
This feature will pay attention to function call entry/exit events
and track the elapsed time and various other metrics in the given
profiling table. The ProfilingOptions can be used to export
intermediate profiling data at regular intervals, if desired.
data ProfilingOptions Source #
Constructors
| ProfilingOptions | |
Fields | |
data EventFilter Source #
Constructors
| EventFilter | |
Fields | |
profilingEventFilter :: EventFilter Source #
An EventFilter that enables only Crucible profiling.
recordSolverEvent :: ProfilingTable -> SolverEvent -> IO () Source #
startRecordingSolverEvents :: IsSymInterface sym => sym -> ProfilingTable -> IO () Source #
enterEvent :: ProfilingTable -> FunctionName -> Maybe ProgramLoc -> IO () Source #
exitEvent :: ProfilingTable -> FunctionName -> IO () Source #
inProfilingFrame :: ProfilingTable -> FunctionName -> Maybe ProgramLoc -> IO a -> IO a Source #
readMetrics :: ProfilingTable -> IO (Metrics Identity) Source #
data CrucibleProfile Source #
Constructors
| CrucibleProfile | |
Fields | |
Instances
readProfilingState :: ProfilingTable -> IO (UTCTime, [CGEvent], [(UTCTime, SolverEvent)]) Source #
Arguments
| :: FilePath | File to write |
| -> String | "name" for the report |
| -> String | "source" for the report |
| -> ProfilingTable | profiling data to populate the report |
| -> IO () |
Write a profiling report file in the JS/JSON format expected by tye symProUI front end.
Profiling data structures
Constructors
| CGEvent | |
Fields | |
Instances
| Generic CGEvent Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling Associated Types
| |||||
| Show CGEvent Source # | |||||
| type Rep CGEvent Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling type Rep CGEvent = D1 ('MetaData "CGEvent" "Lang.Crucible.Simulator.Profiling" "crucible-0.8.0.0-4NPuSrI5sD835MFtwnvz2a" 'False) (C1 ('MetaCons "CGEvent" 'PrefixI 'True) (((S1 ('MetaSel ('Just "cgEvent_fnName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionName) :*: S1 ('MetaSel ('Just "cgEvent_source") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Position))) :*: (S1 ('MetaSel ('Just "cgEvent_callsite") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Position)) :*: S1 ('MetaSel ('Just "cgEvent_type") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CGEventType))) :*: ((S1 ('MetaSel ('Just "cgEvent_blocks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: S1 ('MetaSel ('Just "cgEvent_metrics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Metrics Identity))) :*: (S1 ('MetaSel ('Just "cgEvent_time") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "cgEvent_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))))) | |||||
data CGEventType Source #
Instances
| Generic CGEventType Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling Associated Types
| |||||
| Show CGEventType Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling Methods showsPrec :: Int -> CGEventType -> ShowS # show :: CGEventType -> String # showList :: [CGEventType] -> ShowS # | |||||
| Eq CGEventType Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling | |||||
| Ord CGEventType Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling Methods compare :: CGEventType -> CGEventType -> Ordering # (<) :: CGEventType -> CGEventType -> Bool # (<=) :: CGEventType -> CGEventType -> Bool # (>) :: CGEventType -> CGEventType -> Bool # (>=) :: CGEventType -> CGEventType -> Bool # max :: CGEventType -> CGEventType -> CGEventType # min :: CGEventType -> CGEventType -> CGEventType # | |||||
| type Rep CGEventType Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling type Rep CGEventType = D1 ('MetaData "CGEventType" "Lang.Crucible.Simulator.Profiling" "crucible-0.8.0.0-4NPuSrI5sD835MFtwnvz2a" 'False) ((C1 ('MetaCons "ENTER" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EXIT" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BLOCK" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BRANCH" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data ProfilingTable Source #
Constructors
| ProfilingTable | |
Fields
| |
newtype Metric p sym ext Source #
Some kind of Integer to be collected during execution.
Type parameters:
p: seecruciblePersonalitysym: instance ofIsSymInterfaceext: language extension, see Lang.Crucible.CFG.Extension
data Metrics (f :: Type -> Type) Source #
Constructors
| Metrics | |
Fields
| |
Instances
| FoldableF Metrics Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling Methods foldMapF :: Monoid m => (forall s. e s -> m) -> Metrics e -> m # foldrF :: (forall s. e s -> b -> b) -> b -> Metrics e -> b # foldlF :: (forall s. b -> e s -> b) -> b -> Metrics e -> b # foldrF' :: (forall s. e s -> b -> b) -> b -> Metrics e -> b # foldlF' :: (forall s. b -> e s -> b) -> b -> Metrics e -> b # | |||||
| FunctorF Metrics Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling | |||||
| TraversableF Metrics Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling Methods traverseF :: Applicative m => (forall s. e s -> m (f s)) -> Metrics e -> m (Metrics f) # | |||||
| Generic (Metrics Identity) Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling Associated Types
| |||||
| Show (Metrics Identity) Source # | |||||
| type Rep (Metrics Identity) Source # | |||||
Defined in Lang.Crucible.Simulator.Profiling type Rep (Metrics Identity) = D1 ('MetaData "Metrics" "Lang.Crucible.Simulator.Profiling" "crucible-0.8.0.0-4NPuSrI5sD835MFtwnvz2a" 'False) (C1 ('MetaCons "Metrics" 'PrefixI 'True) ((S1 ('MetaSel ('Just "metricSplits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Identity Integer)) :*: S1 ('MetaSel ('Just "metricMerges") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Identity Integer))) :*: (S1 ('MetaSel ('Just "metricAborts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Identity Integer)) :*: (S1 ('MetaSel ('Just "metricSolverStats") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Identity Statistics)) :*: S1 ('MetaSel ('Just "metricExtraMetrics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Identity (Map Text Integer))))))) | |||||
symProUIJSON :: String -> String -> ProfilingTable -> IO JSValue Source #
symProUIString :: String -> String -> ProfilingTable -> IO String Source #