के साथ निष्पादन योग्य प्रोफाइलिंग कैबल में हाल ही में कुछ बदलावों के बाद, मैं पूरी तरह उलझन में हूं कि निष्पादन योग्य कैसे प्रोफाइल करें। ~/.cabal/config
में, मैं रूपरेखा सक्षम किया गया है:कैबल
[email protected]$ grep prof ~/.cabal/config
library-profiling: True
executable-profiling: True
लेकिन अगर मैं रूपरेखा के साथ अपने निष्पादन योग्य चलाने का प्रयास, मैं मिलता है ...
[email protected]$ cabal run realtra-benchmark +RTS -p
cabal: the flag -p requires the program to be built with -prof
cabal:
cabal: Usage: <prog> <args> [+RTS <rtsopts> | -RTS <args>] ... --RTS <args>
<snip>
अगर मैं बाईपास कबाल करने की कोशिश मैं एक ही प्रतिक्रिया मिल: ./dist/dist-sandbox-c8599c64/build/realtra-benchmark/realtra-benchmark +RTS -p
।
, मेरे कबाल फ़ाइल में GHC-Options:
को -prof
ध्वज जोड़ने के लिए काम करेंगे नहीं:
[email protected]$ cabal build --ghc-options=-Werror && cabal test && cabal install
./realtra.cabal has been changed. Re-configuring with most recently used
options. If this fails, please run configure manually.
Resolving dependencies...
Configuring creatur-realtra-1.0.8...
Warning: 'ghc-options: -prof' is not necessary and will lead to problems when
used on a library. Use the configure flag --enable-library-profiling and/or
--enable-executable-profiling.
मैं समझ मैं उन झंडे को जोड़ने के लिए, क्योंकि वे मेरी कॉन्फ़िग फ़ाइल में हो नहीं करना चाहिए था, लेकिन बस मामले में, मैं इसे आजमाता हूं:
[email protected]$ cabal configure --enable-executable-profiling --enable-library-profiling
Resolving dependencies...
Configuring creatur-realtra-1.0.8...
[email protected]$ cabal build --ghc-options=-Werror && cabal test && cabal install
<snip>
[email protected]$ cabal run realtra-benchmark +RTS -p
cabal: the flag -p requires the program to be built with -prof
cabal:
cabal: Usage: <prog> <args> [+RTS <rtsopts> | -RTS <args>] ... --RTS <args>
<snip>
मुझे क्या याद आ रही है?
क्या आपने इसे आजमाया: 'कैबल रन रीयल-बेंचमार्क + आरटीएस-पी-आरटीएस' – Sibi
' -RTS' ध्वज केवल तभी जरूरी है जब आप गैर-रनटाइम झंडे के साथ चल रहे हों। लेकिन बस यह सुनिश्चित करने के लिए, मैंने अभी अंत में '-RTS' के साथ कोशिश की, और एक ही त्रुटि मिली। – mhwombat
'कैबल रन रीयल-बेंचमार्क - + आरटीएस-पी' का प्रयास करें। मेरा अनुमान है कि '+ आरटीएस' को 'कैबल' निष्पादन योग्य के लिए तर्क के रूप में व्याख्या किया जाता है। –