Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
54dd7e5
Support symbolizing ruby CME frames
dalehamel Oct 24, 2025
6e2c403
Note deprecated metrics
dalehamel Nov 4, 2025
d4289a0
Fix lineno decoding by passing cfp->iseq
dalehamel Nov 21, 2025
75c414c
Cleanup unused label and variable initialization
dalehamel Jan 6, 2026
cf86db8
Move id related constants to const
dalehamel Jan 6, 2026
953cb67
Replace gotos in detecting method entry with unrolled loop
dalehamel Jan 6, 2026
fb51de1
Update dummy value for unknown cfunc to match convention
dalehamel Jan 6, 2026
0f00a13
Cache lastId and reread only if serial is larger
dalehamel Jan 6, 2026
a10b980
Store size of iseq location to buffer full value for npsr
dalehamel Jan 7, 2026
4d8a907
Buffer rbasic + classext + classpath + value to reduce reads when get…
dalehamel Jan 7, 2026
a9dc052
Update interpreter/ruby/ruby.go
dalehamel Jan 8, 2026
ca0c64a
Update interpreter/ruby/ruby.go
dalehamel Jan 8, 2026
a2f032c
Update interpreter/ruby/ruby.go
dalehamel Jan 8, 2026
1dbab6e
Id table lookup improvements
dalehamel Jan 8, 2026
67fe2bb
Reduce log verbosity when failing to read iseq data
dalehamel Jan 8, 2026
f574086
Fix unknown function label format
dalehamel Jan 8, 2026
e6ab31f
Add source code docs
dalehamel Jan 8, 2026
0d27992
Read size of control frame struct from procinfo
dalehamel Jan 8, 2026
148634b
add safety check for reading control frame struct
dalehamel Jan 9, 2026
ccd27f3
Indicate what control frame fields are used and expected to be stable…
dalehamel Jan 9, 2026
4d6c3c4
Apply suggestions from code review
dalehamel Jan 9, 2026
13c899a
Update coredump labels for unknown cfuncs
dalehamel Jan 9, 2026
d04e873
Remove obsolete metric ids
dalehamel Jan 9, 2026
95ee260
Clean up unused frametype from bad rebase
dalehamel Jan 19, 2026
6213800
Simplify ruby frame package and refactor headers
dalehamel Jan 19, 2026
a57a7bc
Additional documentation of the 'why' for approach to ruby CME collec…
dalehamel Jan 19, 2026
86a05c9
Fix extra whitespace
dalehamel Jan 20, 2026
f5e366d
Update bpf blobs
dalehamel Jan 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions interpreter/ruby/flags.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package ruby // import "go.opentelemetry.io/ebpf-profiler/interpreter/ruby"

// Various used ruby ushift constants
// calculates them here based on RUBY_FL_USHIFT, copying their logic
const (
// https://github.com/ruby/ruby/blob/1d1529629ce1550fad19c2d9410c4bf4995230d2/include/ruby/internal/fl_type.h#L158
RUBY_FL_USHIFT = 12

RUBY_FL_USER0 = 1 << (RUBY_FL_USHIFT + 0)
// https://github.com/ruby/ruby/blob/1d1529629ce1550fad19c2d9410c4bf4995230d2/include/ruby/internal/fl_type.h#L323-L324
RUBY_FL_USER1 = 1 << (RUBY_FL_USHIFT + 1)

// Used for computing embed array flag
RUBY_FL_USER3 = 1 << (RUBY_FL_USHIFT + 3)
RUBY_FL_USER4 = 1 << (RUBY_FL_USHIFT + 4)
RUBY_FL_USER5 = 1 << (RUBY_FL_USHIFT + 5)
RUBY_FL_USER6 = 1 << (RUBY_FL_USHIFT + 6)
RUBY_FL_USER7 = 1 << (RUBY_FL_USHIFT + 7)
RUBY_FL_USER8 = 1 << (RUBY_FL_USHIFT + 8)
RUBY_FL_USER9 = 1 << (RUBY_FL_USHIFT + 9)

// https://github.com/ruby/ruby/blob/8836f26efa7a6deb0ef8b3f253d8d53d04d43152/include/ruby/internal/core/rarray.h#L102
RARRAY_EMBED_FLAG = RUBY_FL_USER1

// https://github.com/ruby/ruby/blob/8836f26efa7a6deb0ef8b3f253d8d53d04d43152/include/ruby/internal/core/rarray.h#L114-L115
RARRAY_EMBED_LEN_MASK = RUBY_FL_USER9 | RUBY_FL_USER8 | RUBY_FL_USER7 | RUBY_FL_USER6 |
RUBY_FL_USER5 | RUBY_FL_USER4 | RUBY_FL_USER3

// RARRAY_EMBED_LEN_SHIFT
// https://github.com/ruby/ruby/blob/8836f26efa7a6deb0ef8b3f253d8d53d04d43152/include/ruby/internal/core/rarray.h#L122-L125
RARRAY_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 3
)
Loading