Commit 5b20e35
authored
Add GoOffsetLocator that fulfills DwarfReader API. Use as shim for Go Uprobes (#2207)
Summary: Add `GoOffsetLocator` that fulfills DwarfReader APIs. Use as
shim for Go Uprobes
Our current Go uprobe implementation relies on parsing DWARF
information. This is memory intensive and is not ideal if end users want
to keep the PEM's memory usage low (results in 100-150MB memory spikes).
In order to support lower memory uprobes and to support Go binaries
without DWARF, we can introduce a shim for the existing DwarfReader API
that can read the offsets from a file (via
openteletrmy-go-instrumentation generated offsets) or from the existing
DWARF information.
This PR introduces the `GoOffsetLocator` and tests that it functions
properly while leaving the DWARF based tracing in place. The next set of
changes will populate the offsets from
pixie-io/opentelemetry-go-instrumentation#1 and
provide configuration to choose the desired implementation: solely
DWARF, solely static offsets or to use them in tandem.
Relevant Issues: N/A
Type of change: /kind feature
Test Plan: Existing Go bpf trace tests should pass
---------
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>1 parent cce2254 commit 5b20e35
File tree
6 files changed
+359
-89
lines changed- src/stirling
- binaries
- source_connectors/socket_tracer
6 files changed
+359
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
65 | 74 | | |
66 | | - | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
Lines changed: 35 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
| 527 | + | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
| 552 | + | |
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| |||
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
889 | 904 | | |
890 | | - | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
891 | 913 | | |
892 | 914 | | |
893 | 915 | | |
| |||
898 | 920 | | |
899 | 921 | | |
900 | 922 | | |
901 | | - | |
| 923 | + | |
902 | 924 | | |
903 | 925 | | |
904 | 926 | | |
| |||
912 | 934 | | |
913 | 935 | | |
914 | 936 | | |
915 | | - | |
| 937 | + | |
916 | 938 | | |
917 | 939 | | |
918 | 940 | | |
| |||
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
| 496 | + | |
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
| 504 | + | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
| 520 | + | |
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
583 | | - | |
| 582 | + | |
584 | 583 | | |
585 | | - | |
586 | | - | |
| 584 | + | |
587 | 585 | | |
588 | | - | |
589 | | - | |
| 586 | + | |
590 | 587 | | |
591 | 588 | | |
592 | 589 | | |
| |||
0 commit comments