我正在努力構建帶有分析的應用程式,因為我需要堆疊跟蹤。
$ stack new prof
$ cd prof
$ stack build --profile --executable-profiling --library-profiling
$ stack exec prof-exe RTS -p
stack: the flag -p requires the program to be built with -prof
$ stack --version
Version 2.7.1, Git revision 8afe0c2932716b0441cf4440d6942c59568b6b19 x86_64 hpack-0.34.4
全球通行證 8.10.7
uj5u.com熱心網友回復:
Stack 本身是用 Haskell 撰寫的,因此它也接受 RTS -p引數。要將 傳遞 RTS -p給您,prof-exe您應該使用--分隔符:
stack exec prof-exe -- RTS -p
但是,我認為該run命令應該用于運行可執行檔案,我認為您也需要在--profile那里添加標志。對我有用的命令是:
stack run --profile prof-exe -- RTS -p
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/326048.html
