Skip to content

Commit

Permalink
Fixing some minor typos at multiple places
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Kamathe <kamathe.gaurav@gmail.com>
  • Loading branch information
gkamathe authored and danobi committed Nov 30, 2023
1 parent 996182f commit db63ddb
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/ast/passes/codegen_llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ void CodegenLLVM::visit(Call &call)
auto imap = *bpftrace_.maps.Lookup(map.ident);
if (!imap->is_clearable())
{
// store zero insted of calling bpf_map_delete_elem()
// store zero instead of calling bpf_map_delete_elem()
AllocaInst *val = b_.CreateAllocaBPF(map.type, map.ident + "_zero");
b_.CreateStore(Constant::getNullValue(b_.GetType(map.type)), val);
b_.CreateMapUpdateElem(ctx_, map, key, val, call.loc);
Expand Down Expand Up @@ -1544,7 +1544,7 @@ void CodegenLLVM::binop_int(Binop &binop)

// If left or right is PositionalParameter, that means the syntax is
// str($1 + num) or str(num + $1). The positional params returns a pointer
// to a buffer, and the buffer should live untill str() is accepted.
// to a buffer, and the buffer should live until str() is accepted.
// Extend the lifetime of the buffer
if (dynamic_cast<PositionalParameter *>(binop.left))
expr_deleter_ = scoped_del_left.disarm();
Expand Down Expand Up @@ -2675,7 +2675,7 @@ void CodegenLLVM::visit(Probe &probe)
* Most of the time, we can take a probe like kprobe:do_f* and build a
* single BPF program for that, called "s_kprobe:do_f*", and attach it to
* each wildcard match. An exception is the "probe" builtin, where we need
* to build different BPF programs for each wildcard match that cantains an
* to build different BPF programs for each wildcard match that contains an
* ID for the match. Those programs will be called "s_kprobe:do_fcntl" etc.
*/
if (probe.need_expansion == false) {
Expand Down
2 changes: 1 addition & 1 deletion src/ast/passes/resource_analyser.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ResourceAnalyser : public Visitor

// seq_printf, debugf format strings are stored head to tail in a data
// map. This method loads `RequiredResources::mapped_printf_ids` with the
// starting indicies and lengths of each format string in the data map.
// starting indices and lengths of each format string in the data map.
void prepare_mapped_printf_ids();

// Determines whether the given function uses userspace symbol resolution.
Expand Down
2 changes: 1 addition & 1 deletion src/attached_probe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ bool AttachedProbe::resolve_offset_uprobe(bool safe_mode)
{
LOG(WARNING)
<< msg.str()
<< " Skipping attachment (use --unsafe to force attachement).";
<< " Skipping attachment (use --unsafe to force attachment).";
}
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/attached_probe.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class AttachedProbe
// semaphore if one exists.
//
// Increment semaphore count manually with memory hogging API (least
// preferrable)
// preferable)
int usdt_sem_up_manual(const std::string &fn_name, void *ctx);
// Increment semaphore count manually with BCC addsem API
int usdt_sem_up_manual_addsem(int pid, const std::string &fn_name, void *ctx);
Expand Down
2 changes: 1 addition & 1 deletion src/bpftrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2075,7 +2075,7 @@ std::string BPFtrace::resolve_timestamp(uint32_t mode,
if (!boottime_)
{
LOG(ERROR)
<< "Cannot resolve timestamp due to failed boot time calcuation";
<< "Cannot resolve timestamp due to failed boot time calculation";
return "(?)";
}
else
Expand Down
4 changes: 2 additions & 2 deletions src/resources/stdint.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
*
* These macros are defined using the same successive-shrinking approach as
* the type definitions above. It is likewise important that macros are defined
* in order of decending width.
* in order of descending width.
*
* Note that C++ should not check __STDC_CONSTANT_MACROS here, contrary to the
* claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
Expand Down Expand Up @@ -461,7 +461,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
* As in the type definitions, this section takes an approach of
* successive-shrinking to determine which limits to use for the standard (8,
* 16, 32, 64) bit widths when they don't have exact representations. It is
* therefore important that the definitions be kept in order of decending
* therefore important that the definitions be kept in order of descending
* widths.
*
* Note that C++ should not check __STDC_LIMIT_MACROS here, contrary to the
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Each runtime testcase consists of multiple directives. In no particular order:
built in. See `bpftrace --info` and `runtime/engine/runner.py` for more
details. Also supports negative features (by prefixing `!` before feature).
* `WILL_FAIL`: Mark that this test case will exit uncleanly (ie exit code != 0)
* `NEW_PIDNS`: This will excute the `BEFORE`, the bpftrace (`RUN` or `PROG`),
* `NEW_PIDNS`: This will execute the `BEFORE`, the bpftrace (`RUN` or `PROG`),
and the `AFTER` commands in a new pid namespace that mounts proc. At least one
`BEFORE` is required.

Expand Down
2 changes: 1 addition & 1 deletion tests/clang_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ TEST(clang_parser, bitfields_with_padding)

TEST(clang_parser, builtin_headers)
{
// size_t is definied in stddef.h
// size_t is defined in stddef.h
BPFtrace bpftrace;
parse("#include <stddef.h>\nstruct Foo { size_t x, y, z; }", bpftrace);

Expand Down
2 changes: 1 addition & 1 deletion tests/runtime/other
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ RUN {{BPFTRACE}} -e 'BEGIN { printf("got: %d %o 0x%x\n", $1, $2, $3); exit() }'
EXPECT got: 123 775 0x123
TIMEOUT 5

NAME positional pointer arithmetics
NAME positional pointer arithmetic
RUN {{BPFTRACE}} -e 'BEGIN { printf("%s", str($1 + 1)); exit(); }' hello
EXPECT ello
TIMEOUT 1
Expand Down
2 changes: 1 addition & 1 deletion tools/ssllatency_example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ can be more than 3x if adding more wrk connections. Keep using same
workload for comparison.

libcrypto_mb.so is used instead of libcrypto.so, to batch process multiple
async requets simultaneously by SIMD. As a result, wrk issued 2933 requests
async requests simultaneously by SIMD. As a result, wrk issued 2933 requests
in 1s. Failed SSL_do_handshake calls has doubled(5884), and successful
calls(2941) returned quickly(51us). This is expected from async routines.

Expand Down

0 comments on commit db63ddb

Please sign in to comment.