mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Merge pull request #118 from Calinou/readme-mention-python3
Mention Python 3 support in the README
This commit is contained in:
commit
72c4afecba
14
README.md
14
README.md
@ -6,7 +6,7 @@ Full details of Coz are available in our paper, [Coz: Finding Code that Counts w
|
||||
[![Coz presentation at SOSP 2015](http://img.youtube.com/vi/jE0V-p1odPg/0.jpg)](http://www.youtube.com/watch?v=jE0V-p1odPg&t=0m28s "Coz presentation at SOSP 2015")
|
||||
|
||||
## Installation
|
||||
To run Coz, you will need a Linux machine with kernel version 2.6.32 or later (it must support the `perf_event_open` system call) and a Python 2.7 interpreter. Coz is available as a Debian package. If you use a Debian-based distribution you can install Coz with the line:
|
||||
To run Coz, you will need a Linux machine with kernel version 2.6.32 or later (it must support the `perf_event_open` system call) and a Python 3 interpreter. Coz is available as a Debian package. If you use a Debian-based distribution, you can install Coz with the line:
|
||||
|
||||
```
|
||||
$ sudo apt-get install coz-profiler
|
||||
@ -17,7 +17,7 @@ To build Coz from source, you will need:
|
||||
|
||||
- A copy of the source code for this project
|
||||
- A compiler with C++0x support (clang++ or g++)
|
||||
- A python 2.7 interpreter
|
||||
- A Python 3 interpreter (Python 2.7 isn't supported)
|
||||
- The libelfin development libraries
|
||||
- The `rst2man` command (for building documentation
|
||||
- NodeJS and npm (for building the profiler viewer)
|
||||
@ -25,7 +25,7 @@ To build Coz from source, you will need:
|
||||
Once you have all dependencies in place, run `make` to build Coz. On Debian-based distributions, the following commands should take care of the entire process:
|
||||
|
||||
```
|
||||
$ sudo apt-get install clang docutils-common libelfin-dev nodejs npm python2.7
|
||||
$ sudo apt-get install clang docutils-common libelfin-dev nodejs npm python3
|
||||
$ git clone https://github.com/plasma-umass/coz.git
|
||||
$ cd coz
|
||||
$ make
|
||||
@ -39,17 +39,17 @@ To run your program with coz, you will need to build it with debug information.
|
||||
Once you have your program built with debug information, you can run it with coz using the command `coz run {coz options} --- {program name and arguments}`. But, to produce a useful profile you need to decide which part(s) of the application you want to speed up by specifying one or more progress points.
|
||||
|
||||
### Profiling Modes
|
||||
Coz departs from conventional profiling by making it possible to view the effect of optimizations on both throughput and latency. To profile throughput, you must specify a progress point. To profile latency, you must specify a pair of progress points.
|
||||
Coz departs from conventional profiling by making it possible to view the effect of optimizations on both throughput and latency. To profile throughput, you must specify a progress point. To profile latency, you must specify a pair of progress points.
|
||||
|
||||
#### Throughput Profiling: Specifying Progress Points
|
||||
To profile throughput you must indicate a line in the code that corresponds to the end of a unit of work. For example, a progress point could be the point at which a transaction concludes, when a web page finishes rendering, or when a query completes. Coz then measures the rate of visits to each progress point to determine any potential optimization's effect on throughput.
|
||||
To profile throughput you must indicate a line in the code that corresponds to the end of a unit of work. For example, a progress point could be the point at which a transaction concludes, when a web page finishes rendering, or when a query completes. Coz then measures the rate of visits to each progress point to determine any potential optimization's effect on throughput.
|
||||
|
||||
To place a progress point, include `coz.h` (under the `include` directory in this repository) and add the `COZ_PROGRESS` macro to at least one line you would like to execute more frequently. Don't forget to link your program with libdl: use the `-ldl` option.
|
||||
To place a progress point, include `coz.h` (under the `include` directory in this repository) and add the `COZ_PROGRESS` macro to at least one line you would like to execute more frequently. Don't forget to link your program with libdl: use the `-ldl` option.
|
||||
|
||||
By default, Coz uses the source file and line number as the name for your progress points. If you use `COZ_PROGRESS_NAMED("name for progress point")` instead, you can provide an informative name for your progress points. This also allows you to mark multiple source locations that correspond to the same progress point.
|
||||
|
||||
#### Latency Profiling: Specifying Progress Points
|
||||
To profile latency, you must place two progress points that correspond to the start and end of an event of interest, such as when a transaction begins and completes. Simply mark the beginning of a transaction with the `COZ_BEGIN("transaction name")` macro, and the end with the `COZ_END("transaction name")` macro. Unlike regular progress points, you always need to specify a name for your latency progress points. Don't forget to link your program with libdl: use the `-ldl` option.
|
||||
To profile latency, you must place two progress points that correspond to the start and end of an event of interest, such as when a transaction begins and completes. Simply mark the beginning of a transaction with the `COZ_BEGIN("transaction name")` macro, and the end with the `COZ_END("transaction name")` macro. Unlike regular progress points, you always need to specify a name for your latency progress points. Don't forget to link your program with libdl: use the `-ldl` option.
|
||||
|
||||
When coz tests a hypothetical optimization it will report the effect of that optimization on the average latency between these two points. Coz can track this information with any knowledge of individual transactions thanks to [Little's Law](https://en.wikipedia.org/wiki/Little%27s_law).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user