Skip to content

Commit

Permalink
docs: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk committed Nov 14, 2016
1 parent 082866d commit 6d93113
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/reference_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Examples in situ:

Syntax: ```BPF_HASH(name [, key_type [, leaf_type [, size]]])```

Creates a hash map (associative array) named ```name```, with optional paramaters.
Creates a hash map (associative array) named ```name```, with optional parameters.

Defaults: ```BPF_HASH(name, key_type=u64, leaf_type=u64, size=10240)```

Expand All @@ -406,7 +406,7 @@ Examples in situ:
Syntax: ```BPF_HISTOGRAM(name [, key_type [, size ]])```

Creates a histogram map named ```name```, with optional paramaters.
Creates a histogram map named ```name```, with optional parameters.

Defaults: ```BPF_HISTOGRAM(name, key_type=int, size=64)```

Expand Down Expand Up @@ -1034,7 +1034,7 @@ Examples in situ:

Syntax: ```BPF.ksymaddr(addr)```

Translate a kernel memory address into a kernel function name plus the instruction offset as a hexidecimal number, which is returned as a string.
Translate a kernel memory address into a kernel function name plus the instruction offset as a hexadecimal number, which is returned as a string.

Example:

Expand Down
10 changes: 5 additions & 5 deletions docs/tutorial_bcc_python_developer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bcc Python Developer Tutorial

This tutorial is about developing [bcc](https://github.com/iovisor/bcc) tools and programs using the Python interface. There are two parts: observability then networking. Snippits are taken from various programs in bcc: see their files for licences.
This tutorial is about developing [bcc](https://github.com/iovisor/bcc) tools and programs using the Python interface. There are two parts: observability then networking. Snippets are taken from various programs in bcc: see their files for licences.

Also see the bcc developer's [reference_guide.md](reference_guide.md), and a tutorial for end-users of tools: [tutorial.md](tutorial.md). There is also a lua interface for bcc.

Expand Down Expand Up @@ -100,7 +100,7 @@ This is similar to hello_world.py, and traces new processes via sys_clone() agai

### Lesson 4. sync_timing.py

Remember the days of sysadmins typing ```sync``` three times on a slow console before ```reboot```, to give the first asynchrosous sync time to complete? Then someone thought ```sync;sync;sync``` was clever, to run them all on one line, which became industry practice despite defeating the original purpose! And then sync became synchronous, so more reasons it was silly. Anyway.
Remember the days of sysadmins typing ```sync``` three times on a slow console before ```reboot```, to give the first asynchronous sync time to complete? Then someone thought ```sync;sync;sync``` was clever, to run them all on one line, which became industry practice despite defeating the original purpose! And then sync became synchronous, so more reasons it was silly. Anyway.

The following example times how quickly the ```do_sync``` function is called, and prints output if it has been called more recently than one second ago. A ```sync;sync;sync``` will print output for the 2nd and 3rd sync's:

Expand Down Expand Up @@ -167,7 +167,7 @@ Things to learn:

### Lesson 5. sync_count.py

Modify the sync_timing.py program (prior lession) to store the count of all sys_sync() calls (both fast and slow), and print it with the output. This count can be recorded in the BPF program by adding a new key index to the existing hash.
Modify the sync_timing.py program (prior lesson) to store the count of all sys_sync() calls (both fast and slow), and print it with the output. This count can be recorded in the BPF program by adding a new key index to the existing hash.

### Lesson 6. disksnoop.py

Expand Down Expand Up @@ -378,7 +378,7 @@ except KeyboardInterrupt:
b["dist"].print_log2_hist("kbytes")
```

A recap from earlier lessions:
A recap from earlier lessons:

- ```kprobe__```: This prefix means the rest will be treated as a kernel function name that will be instrumented using kprobe.
- ```struct pt_regs *ctx, struct request *req```: Arguments to kprobe. The ```ctx``` is registers and BPF context, the ```req``` is the first argument to the instrumented function: ```blk_account_io_completion()```.
Expand Down Expand Up @@ -603,7 +603,7 @@ TIME(s) COMM PID ARGS
24653340.510164998 node 24728 path:/images/favicon.png
```

Relevent code from [examples/tracing/nodejs_http_server.py](../examples/tracing/nodejs_http_server.py):
Relevant code from [examples/tracing/nodejs_http_server.py](../examples/tracing/nodejs_http_server.py):

```Python
if len(sys.argv) < 2:
Expand Down

0 comments on commit 6d93113

Please sign in to comment.