Update scripts to use `increment` (#1905)
* Replace boilerplate for increment with a call to `increment`
from new tooling. Found cases to replace using `ripgrep`[1]:
```
$ rg '\(\*\w+\)\s*\+\+' -l | grep tools | grep -v old
```
[1]: https://github.com/BurntSushi/ripgrep
* Replace boilerplate for bigger than 1 increments with the new
`increment` call
from new tooling. Found cases to replace using `ripgrep`[1]:
```
$ rg '\(\*\w+\)\s*\+=' -l | grep tools | grep -v old
```
[1]: https://github.com/BurntSushi/ripgrep
* Update examples indicating the alternative increment call for hash tables
diff --git a/examples/tracing/task_switch.py b/examples/tracing/task_switch.py
index 7a73d8b..161edfb 100755
--- a/examples/tracing/task_switch.py
+++ b/examples/tracing/task_switch.py
@@ -22,6 +22,7 @@
key.curr_pid = bpf_get_current_pid_tgid();
key.prev_pid = prev->pid;
+ // could also use `stats.increment(key);`
val = stats.lookup_or_init(&key, &zero);
(*val)++;
return 0;