threadscope 0.2.10 → 0.2.11
raw patch · 8 files changed
+63/−16 lines, 8 filesdep ~template-haskelldep ~temporary
Dependency ranges changed: template-haskell, temporary
Files
- GUI/BookmarkView.hs +2/−1
- GUI/KeyView.hs +2/−1
- GUI/StartupInfoView.hs +3/−2
- GUI/SummaryView.hs +3/−2
- GUI/TraceView.hs +2/−1
- Graphics/UI/Gtk/ModelView/TreeView/Compat.hs +22/−0
- README.md +21/−2
- threadscope.cabal +8/−7
GUI/BookmarkView.hs view
@@ -13,6 +13,7 @@ import GHC.RTS.Events (Timestamp) import Graphics.UI.Gtk+import qualified Graphics.UI.Gtk.ModelView.TreeView.Compat as Compat import Numeric ---------------------------------------------------------------------------@@ -81,7 +82,7 @@ treeViewAppendColumn bookmarkTreeView columnTs treeViewAppendColumn bookmarkTreeView columnLabel - treeViewSetModel bookmarkTreeView bookmarkStore+ Compat.treeViewSetModel bookmarkTreeView (Just bookmarkStore) cellLayoutSetAttributes columnTs cellTs bookmarkStore $ \(ts,_) -> [ cellText := showFFloat (Just 6) (fromIntegral ts / 1000000) "s" ]
GUI/KeyView.hs view
@@ -7,6 +7,7 @@ import GUI.Timeline.Render.Constants import Graphics.UI.Gtk+import qualified Graphics.UI.Gtk.ModelView.TreeView.Compat as Compat import qualified Graphics.Rendering.Cairo as C @@ -40,7 +41,7 @@ let tooltipColumn = makeColumnIdString 0 customStoreSetColumn keyStore tooltipColumn (\(_,tooltip,_) -> tooltip)- treeViewSetModel keyTreeView keyStore+ Compat.treeViewSetModel keyTreeView (Just keyStore) set keyTreeView [ treeViewTooltipColumn := tooltipColumn ]
GUI/StartupInfoView.hs view
@@ -7,6 +7,7 @@ import GHC.RTS.Events import Graphics.UI.Gtk+import qualified Graphics.UI.Gtk.ModelView.TreeView.Compat as Compat import Data.Array import Data.List@@ -54,7 +55,7 @@ treeViewColumnPackStart columnArgs cellArgs True treeViewAppendColumn treeviewProgArgs columnArgs - treeViewSetModel treeviewProgArgs storeProgArgs+ Compat.treeViewSetModel treeviewProgArgs (Just storeProgArgs) set cellArgs [ cellTextEditable := True ] cellLayoutSetAttributes columnArgs cellArgs storeProgArgs $ \arg ->@@ -71,7 +72,7 @@ treeViewAppendColumn treeviewProgEnv columnVar treeViewAppendColumn treeviewProgEnv columnValue - treeViewSetModel treeviewProgEnv storeProgEnv+ Compat.treeViewSetModel treeviewProgEnv (Just storeProgEnv) cellLayoutSetAttributes columnVar cellVar storeProgEnv $ \(var,_) -> [ cellText := var ]
GUI/SummaryView.hs view
@@ -10,6 +10,7 @@ import GUI.Types import Graphics.UI.Gtk+import qualified Graphics.UI.Gtk.ModelView.TreeView.Compat as Compat import Control.Exception (assert) import Control.Monad@@ -95,7 +96,7 @@ let summaryView = SummaryView{..} treeviewGcStats <- getWidget castToTreeView "treeviewGcStats"- treeViewSetModel treeviewGcStats storeGcStats+ Compat.treeViewSetModel treeviewGcStats (Just storeGcStats) let addGcColumn = addColumn treeviewGcStats storeGcStats addGcColumn "Generation" $ \(GcStatsEntry gen _ _ _ _ _) -> [ cellText := if gen == -1 then "GC Total" else "Gen " ++ show gen ]@@ -111,7 +112,7 @@ [ cellText := (printf "%3.4fs" maxpause :: String) ] treeviewSparkStats <- getWidget castToTreeView "treeviewSparkStats"- treeViewSetModel treeviewSparkStats storeSparkStats+ Compat.treeViewSetModel treeviewSparkStats (Just storeSparkStats) let addSparksColumn = addColumn treeviewSparkStats storeSparkStats addSparksColumn "HEC" $ \(hec, _) -> [ cellText := if hec == -1 then "Total" else "HEC " ++ show hec ]
GUI/TraceView.hs view
@@ -10,6 +10,7 @@ import GUI.Types import Graphics.UI.Gtk+import qualified Graphics.UI.Gtk.ModelView.TreeView.Compat as Compat import Data.Tree @@ -44,7 +45,7 @@ treeViewColumnPackStart traceColumn togglecell False treeViewAppendColumn tracesTreeView traceColumn - treeViewSetModel tracesTreeView tracesStore+ Compat.treeViewSetModel tracesTreeView (Just tracesStore) cellLayoutSetAttributes traceColumn textcell tracesStore $ \(tr, _) -> [ cellText := renderTrace tr ]
+ Graphics/UI/Gtk/ModelView/TreeView/Compat.hs view
@@ -0,0 +1,22 @@+{-# LANGUAGE CPP #-}+module Graphics.UI.Gtk.ModelView.TreeView.Compat+ ( treeViewSetModel+ ) where+import Graphics.UI.Gtk hiding (treeViewSetModel)+import qualified Graphics.UI.Gtk.ModelView.TreeView as Gtk+#if !MIN_VERSION_gtk(0, 14, 9)+import qualified System.Glib.FFI as Glib+import qualified Graphics.UI.GtkInternals as Gtk+#endif++treeViewSetModel+ :: (TreeViewClass self, TreeModelClass model)+ => self+ -> Maybe model+ -> IO ()+#if MIN_VERSION_gtk(0, 14, 9)+treeViewSetModel = Gtk.treeViewSetModel+#else+treeViewSetModel self model = Gtk.treeViewSetModel self+ (maybe (Gtk.TreeModel Glib.nullForeignPtr) toTreeModel model)+#endif
README.md view
@@ -27,6 +27,8 @@ ## Building from source +Use `git clone` or `cabal unpack threadscope` to get the source and move into the threadscope directory.+ ### Linux GTK+2 is required to be installed. On Ubuntu-like systems:@@ -67,10 +69,25 @@ ### Windows -stack is the recommended tool to build threadscope on Windows.+[Chocolatey](https://chocolatey.org/) can be used to install GHC and [MSYS2](https://www.msys2.org/) is the recommended way to install GTK+. -CAVEAT: Currently gtk2 needs to be installed twice: one for stack's MSYS2 environment and another for local MSYS2 environment.+```sh+choco install ghc+refreshenv+set PATH=C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%+pacman -Sy mingw-w64-x86_64-gtk2+``` +then you can build threadscope using cabal:++```sh+cabal new-build+```++Or you can use stack instead.++CAVEAT: gtk2 needs to be installed twice: one for stack's MSYS2 environment and another for local MSYS2 environment.+ In command prompt: ```sh stack setup@@ -88,3 +105,5 @@ source .profile threadscope ```++Building using stack is not tested in CI. If you find any issues with building with stack, please update the instructions and send a PR.
threadscope.cabal view
@@ -1,5 +1,5 @@ Name: threadscope-Version: 0.2.10+Version: 0.2.11 Category: Development, Profiling, Trace Synopsis: A graphical tool for profiling parallel Haskell programs. Description: ThreadScope is a graphical viewer for thread profile@@ -35,10 +35,10 @@ Data-files: threadscope.ui, threadscope.png Extra-source-files: include/windows_cconv.h README.md-Tested-with: GHC == 7.8.3,- GHC == 7.10.2,- GHC == 8.0.2,- GHC == 8.2.1+Tested-with: GHC == 7.10.2+ GHC == 8.0.2+ GHC == 8.2.2+ GHC == 8.4.2 source-repository head type: git@@ -62,8 +62,8 @@ time >= 1.1 && < 1.10, bytestring < 0.11, file-embed < 0.1,- template-haskell < 2.13,- temporary >= 1.1 && < 1.3+ template-haskell < 2.14,+ temporary >= 1.1 && < 1.4 if os(osx) build-depends: gtk-mac-integration < 0.4 @@ -104,6 +104,7 @@ GUI.Timeline.Types, GUI.Timeline.Render.Constants, GUI.GtkExtras+ Graphics.UI.Gtk.ModelView.TreeView.Compat Paths_threadscope ghc-options: -Wall -fwarn-tabs -rtsopts