Skip to content

Commit c481811

Browse files
committed
some changes in faq.rst, added an example how to upload just a program part
1 parent 949fa73 commit c481811

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/faq.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,27 @@ Frequently Asked Questions
77
If the symbol has been exported in the shared object (on linux), ``dladdr`` might still be able to extract
88
the function name even if no debugging information has been attached.
99

10+
* **Is it possible to just profile a short part of my profile?**: Yes here an example how you could do just that:
11+
12+
```
13+
with open('test.prof', 'w+b') as fd:
14+
vmprof.enable(fd.fileno())
15+
my_function_or_program()
16+
vmprof.disable()
17+
18+
```
19+
20+
And upload it later when your program finishes.
21+
22+
$ python -m vmprof.upload test.prof
23+
24+
25+
1026
* **What do the colors on vmprof.com mean?**: For plain CPython there is no particular meaning, we might change
1127
that in the future. For PyPy we have a color coding to show at which state the VM sampled (e.g. JIT, Warmup, ...).
1228

1329
* **My Windows profile is malformed?**: Please ensure that you open the file in binary mode. Otherwise Windows
14-
will transform `\n` to `\r\n`.
30+
will transform ``\n`` to ``\r\n``.
1531

1632
* **Do I need to install libunwind?**: Usually not. We ship python wheels that bundle libunwind shared objects. If you install vmprof from source, then you need to install the development headers of your distribution. OSX ships libunwind per default. If your pip version is really old it does not pull wheels and it will end up compiling from source.
1733

0 commit comments

Comments
 (0)