Skip to content

Commit

Permalink
lint: Add clang-format to justfile
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
  • Loading branch information
javierhonduco committed Aug 20, 2023
1 parent 829fd4a commit 7080866
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ test-asan: build-native-libraries

build-native-libraries:
./tools/build_deps

c-fmt:
find src/bpf/ ! -iname vmlinux.h -iname *.h -o -iname *.c | xargs clang-format -i
8 changes: 4 additions & 4 deletions src/bpf/rbperf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@

#define rb_value_sizeof 0x8 // sizeof(VALUE)

#define iseq_offset 0x10 // offsetof(rb_control_frame_t, iseq)
#define body_offset 0x10 // offsetof(struct rb_iseq_struct, body)
#define iseq_offset 0x10 // offsetof(rb_control_frame_t, iseq)
#define body_offset 0x10 // offsetof(struct rb_iseq_struct, body)
#define ruby_location_offset 0x40 // offsetof(struct rb_iseq_constant_body, location)
#define path_offset 0x0 // offsetof(struct rb_iseq_location_struct, path)
#define path_offset 0x0 // offsetof(struct rb_iseq_location_struct, path)
#define iseq_encoded_offset \
0x8 // offsetof(struct rb_iseq_constant_body, iseq_encoded)

#define as_offset 0x10

#define STRING_ON_HEAP(flags) flags &(1 << 13)
#define STRING_ON_HEAP(flags) flags & (1 << 13)
#define inline_method inline __attribute__((__always_inline__))

// CRuby constants, from
Expand Down

0 comments on commit 7080866

Please sign in to comment.