eBPF Developer Tutorial: Learning eBPF Step by Step with Examples
This report summarizes scanner evidence for eunomia-bpf/bpf-developer-tutorial, a C project with 4,326 GitHub stars. SynthScan examined 109,112 lines of code across 467 source files, recording 322 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 3.5 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 245 finding(s).
Are imports declared and package/API names verified? 23 finding(s).
Are wrappers, guards, and repeated structures necessary? 106 finding(s).
Which changes need focused human review? 322 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 322 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/26-sudo/common.h | 1 | // SPDX-License-Identifier: BSD-3-Clause | COMMENT |
| LOW | src/32-wallclock-profiler/oncputime.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/32-wallclock-profiler/common.h | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/32-wallclock-profiler/arg_parse.h | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/32-wallclock-profiler/offcputime.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/32-wallclock-profiler/tests/test_multithread.c | 1 | #define _GNU_SOURCE | COMMENT |
| LOW | src/32-wallclock-profiler/tests/double_bandwidth.cpp | 1 | /** | COMMENT |
| LOW | src/46-xdp-test/test_udp_pkt.h | 1 | #ifndef TEST_UDP_PKT_H | COMMENT |
| LOW | src/46-xdp-test/xdp-pktgen.c | 1 | /* SPDX-License-Identifier: MIT */ | COMMENT |
| LOW | src/46-xdp-test/xdp-pktgen.c | 21 | #include <bpf/bpf_endian.h> | COMMENT |
| LOW | src/54-exec-image-inspector/README.zh.md | 161 | COMMENT | |
| LOW | src/54-exec-image-inspector/README.md | 161 | COMMENT | |
| LOW | src/54-exec-image-inspector/exec_image_inspector.bpf.c | 1 | // SPDX-License-Identifier: GPL-2.0 | COMMENT |
| LOW | src/54-exec-image-inspector/exec_image_inspector.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/51-tcp-quarantine/tcp_quarantine.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/48-energy/energy_monitor.c | 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause | COMMENT |
| LOW | src/35-user-ringbuf/user_ringbuf.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/49-hid/hid-input-modifier.c | 1 | // SPDX-License-Identifier: GPL-2.0 | COMMENT |
| LOW | src/49-hid/hid_bpf_helpers.h | 21 | enum hid_class_request reqtype) __ksym; | COMMENT |
| LOW | src/49-hid/hid_bpf_helpers.h | 41 | #define BUS_ADB 0x17 | COMMENT |
| LOW | src/49-hid/hid_bpf_helpers.h | 141 | _9, _10, _11, _12, _13, _14, _15,\ | COMMENT |
| LOW | src/13-tcpconnlat/tcpconnlat.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/xpu/flamegraph/combined_flamegraph.pl | 1 | #!/usr/bin/perl -w | COMMENT |
| LOW | src/xpu/flamegraph/combined_flamegraph.pl | 21 | # stackcollapse-perf.pl, for DTrace using stackcollapse.pl, and for other tools | COMMENT |
| LOW | src/xpu/flamegraph/combined_flamegraph.pl | 41 | # The output flame graph shows relative presence of functions in stack samples. | COMMENT |
| LOW | src/xpu/flamegraph/combined_flamegraph.pl | 61 | # was in turn inspired by the work on vftrace by Jan Boerhout". See: | COMMENT |
| LOW | src/xpu/flamegraph/combined_flamegraph.pl | 81 | # If applicable, add the following below this CDDL HEADER, with the | COMMENT |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 2261 | super().__init__(*args, **kwargs) | COMMENT |
| LOW | src/xpu/flamegraph/cupti_trace/helper_cupti.h | 21 | #ifndef EXIT_WAIVED | COMMENT |
| LOW | src/xpu/flamegraph/cupti_trace/helper_cupti_activity.h | 21 | #include <stdlib.h> | COMMENT |
| LOW | …c/xpu/flamegraph/cupti_trace/cupti_trace_injection.cpp | 41 | // CUPTI headers | COMMENT |
| LOW | src/xpu/flamegraph/profiler/src/main.rs | 41 | sw_event: bool, | COMMENT |
| LOW | src/features/bpf_token/token_userns_demo.c | 1 | // SPDX-License-Identifier: GPL-2.0 | COMMENT |
| LOW | src/features/bpf_token/token_trace.c | 1 | // SPDX-License-Identifier: GPL-2.0 | COMMENT |
| LOW | src/features/dynptr/README.zh.md | 201 | NULL 检查模式至关重要。如果请求的偏移量加长度超过包边界,或者由于其他原因无法访问数据,每个切片调用都可能失败。在使用返回的指针之前检查 NULL 是必须的。 | COMMENT |
| LOW | src/features/dynptr/README.md | 201 | The NULL check pattern is crucial. Each slice call can fail if the requested offset plus length exceeds packet bounds or | COMMENT |
| LOW | src/features/dynptr/dynptr_tc.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/features/dynptr/dynptr_tc.bpf.c | 1 | // SPDX-License-Identifier: GPL-2.0 | COMMENT |
| LOW | src/features/bpf_arena/README.zh.md | 181 | COMMENT | |
| LOW | src/features/bpf_arena/README.md | 181 | COMMENT | |
| LOW | src/features/bpf_arena/bpf_arena_common.h | 41 | #define __arena | COMMENT |
| LOW | src/features/struct_ops/module/compact.h | 1 | // Compatible for lower kernel versions. No need in 6.11. | COMMENT |
| LOW | src/17-biopattern/biopattern.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/17-biopattern/trace_helpers.c | 1 | /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ | COMMENT |
| LOW | src/cgroup/README.zh.md | 301 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause | COMMENT |
| LOW | src/cgroup/README.md | 301 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause | COMMENT |
| LOW | src/cgroup/cgroup_guard.c | 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause | COMMENT |
| LOW | src/30-sslsniff/sslsniff.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/30-sslsniff/sslsniff.bpf.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/44-scx-simple/include/scx/common.bpf.h | 1 | /* SPDX-License-Identifier: GPL-2.0 */ | COMMENT |
| LOW | src/45-scx-nest/include/scx/common.bpf.h | 1 | /* SPDX-License-Identifier: GPL-2.0 */ | COMMENT |
| LOW | src/16-memleak/memleak.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/16-memleak/trace_helpers.c | 1 | /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ | COMMENT |
| LOW | src/53-egress-pacer/egress_pacer.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/24-hide/pidhide.h | 1 | // SPDX-License-Identifier: BSD-3-Clause | COMMENT |
| LOW | src/24-hide/pidhide.c | 1 | // SPDX-License-Identifier: BSD-3-Clause | COMMENT |
| LOW | src/42-xdp-loadbalancer/xdp_lb.bpf.c | 1 | // xdp_lb.bpf.c | COMMENT |
| LOW | src/34-syscall/exechijack.h | 1 | // SPDX-License-Identifier: BSD-3-Clause | COMMENT |
| LOW | src/47-cuda-events/cuda_events.c | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | COMMENT |
| LOW | src/52-fsession-latency/README.zh.md | 141 | COMMENT | |
| 33 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/check_links.py | 95 | except Exception as e: | CODE |
| MEDIUM | .github/check_links.py | 96 | print(f"Error reading {filepath}: {e}") | CODE |
| LOW | .github/check_links.py | 136 | except Exception as e: | CODE |
| MEDIUM⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 383 | print(f"Error setting up FlameGraph tools: {e}") | CODE |
| MEDIUM⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 423 | print(f"Error creating custom flamegraph script: {e}") | CODE |
| MEDIUM⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 623 | print(f"Error generating flamegraph {svg_file}: {result.stderr}") | CODE |
| MEDIUM⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 626 | print(f"Error running flamegraph.pl: {e}") | CODE |
| MEDIUM | src/32-wallclock-profiler/wallclock_profiler.py | 468 | print(f"Error writing folded data: {e}") | CODE |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 382 | except Exception as e: | CODE |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 422 | except Exception as e: | CODE |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 625 | except Exception as e: | CODE |
| MEDIUM⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 877 | print(f"Error: Process {args.pid} does not exist", file=sys.stderr) | STRING |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 68 | except Exception: | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 94 | except Exception as e: | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 120 | except Exception as e: | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 233 | except Exception as e: | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 257 | except Exception as e: | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 467 | except Exception as e: | CODE |
| MEDIUM | src/32-wallclock-profiler/wallclock_profiler.py | 915 | print(f"Error: {e}", file=sys.stderr) | STRING |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 914 | except Exception as e: | STRING |
| LOW | src/xpu/flamegraph/gpuperf.py | 101 | except Exception as e: | CODE |
| MEDIUM | src/xpu/flamegraph/gpuperf.py | 127 | print(f"Error: CUPTI injection library not found at {self.injection_lib}", file=sys.stderr) | CODE |
| LOW | src/xpu/flamegraph/gpuperf.py | 185 | except Exception as e: | CODE |
| MEDIUM | src/xpu/flamegraph/gpuperf.py | 186 | print(f"Error running command: {e}", file=sys.stderr) | CODE |
| LOW | src/xpu/flamegraph/gpuperf.py | 217 | except Exception as e: | CODE |
| MEDIUM | src/xpu/flamegraph/gpuperf.py | 218 | print(f"Error converting trace: {e}", file=sys.stderr) | CODE |
| LOW | src/xpu/flamegraph/gpuperf.py | 286 | except Exception as e: | CODE |
| MEDIUM | src/xpu/flamegraph/gpuperf.py | 287 | print(f"Error generating merged trace: {e}", file=sys.stderr) | CODE |
| MEDIUM | src/xpu/flamegraph/gpuperf.py | 301 | print(f"Error: Input file '{input_file}' not found", file=sys.stderr) | CODE |
| LOW⚡ | src/xpu/flamegraph/gpuperf.py | 327 | except Exception as e: | CODE |
| MEDIUM⚡ | src/xpu/flamegraph/gpuperf.py | 328 | print(f"Error converting trace: {e}", file=sys.stderr) | CODE |
| MEDIUM | src/xpu/flamegraph/gpuperf.py | 377 | print("Error: CPU profiler not available", file=sys.stderr) | CODE |
| LOW | src/xpu/flamegraph/gpuperf.py | 392 | except Exception as e: | CODE |
| MEDIUM | src/xpu/flamegraph/gpuperf.py | 393 | print(f"Error: {e}", file=sys.stderr) | CODE |
| MEDIUM | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 391 | print(f"Error: CPU trace file not found: {args.cpu}", file=sys.stderr) | CODE |
| MEDIUM | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 395 | print(f"Error: GPU trace file not found: {args.gpu}", file=sys.stderr) | CODE |
| MEDIUM | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 1389 | def set_vocab(self): | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 451 | except Exception as e: | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 1392 | except Exception: | CODE |
| LOW | src/xpu/flamegraph/qwen3.cu/header.py | 86 | except Exception as e: | CODE |
| LOW | src/xpu/flamegraph/qwen3.cu/header.py | 100 | except Exception as e: | CODE |
| LOW | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 32 | except Exception: | CODE |
| LOW | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 52 | except Exception: | CODE |
| LOW | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 103 | except Exception: | CODE |
| LOW | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 119 | except Exception: | CODE |
| LOW | src/53-egress-pacer/tests/test_egress_pacer.py | 103 | except Exception as error: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 82 | def test_accepts_exact_standard_markdown_fences(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 88 | def test_rejects_stale_source_block(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 94 | def test_rejects_duplicate_exact_source_block(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 102 | def test_rejects_legacy_html_markers(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 114 | def test_rejects_source_outside_repository(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 120 | def test_rejects_readme_as_source(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 126 | def test_rejects_incomplete_inventory(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 134 | def test_rejects_unsupported_source_type(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 142 | def test_accepts_longer_fence_for_source_with_backticks(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 150 | def test_rejects_empty_source(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 157 | def test_rejects_source_without_final_lf(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 164 | def test_requires_bilingual_pair(self) -> None: | CODE |
| LOW⚡ | …production-tutorial/scripts/test_sync_source_blocks.py | 172 | def test_rejects_unclosed_fence(self) -> None: | CODE |
| LOW⚡ | scripts/test_generate_compatibility.py | 20 | def test_every_tutorial_has_valid_metadata(self): | CODE |
| LOW⚡ | scripts/test_generate_compatibility.py | 28 | def test_bilingual_tables_contain_every_tutorial(self): | CODE |
| LOW⚡ | scripts/test_generate_compatibility.py | 37 | def test_missing_field_is_rejected(self): | CODE |
| LOW | scripts/test_generate_compatibility.py | 50 | def test_required_btf_config_is_enforced(self): | CODE |
| LOW | scripts/test_generate_compatibility.py | 64 | def test_duplicate_config_field_is_rejected(self): | CODE |
| LOW | scripts/test_generate_compatibility.py | 71 | def test_empty_csv_item_is_rejected(self): | CODE |
| LOW | scripts/test_generate_compatibility.py | 85 | def test_per_arch_kernel_min_covers_all_architectures(self): | CODE |
| LOW | scripts/test_generate_compatibility.py | 99 | def test_not_applicable_basis_requires_not_applicable_kernel(self): | CODE |
| LOW | scripts/test_generate_compatibility.py | 113 | def test_repository_baseline_is_consistent(self): | CODE |
| LOW | scripts/rename.py | 3 | def rename_readme_en_to_readme(base_dir): | CODE |
| LOW | scripts/rename.py | 15 | def rename_readme_to_readme_zh(base_dir): | CODE |
| LOW | scripts/test_generate_toc.py | 38 | def test_english_and_chinese_indexes_contain_the_same_lessons(self): | CODE |
| LOW | scripts/test_generate_toc.py | 41 | def test_chinese_tracing_subsection_contains_all_tracing_lessons(self): | CODE |
| LOW | scripts/generate_compatibility.py | 86 | def _validate_per_arch_kernel(path: Path, value: str, architectures: list[str]) -> None: | CODE |
| LOW | scripts/generate_toc.py | 276 | def generate_file_from_template(template_path, output_path, toc_content): | CODE |
| LOW | scripts/test_check_internal_links.py | 9 | def test_accepts_existing_paths_and_ignores_non_file_links(self): | CODE |
| LOW | scripts/test_check_internal_links.py | 43 | def test_reports_missing_relative_link_with_source_line(self): | CODE |
| LOW | scripts/test_check_internal_links.py | 57 | def test_reports_missing_reference_destination(self): | CODE |
| LOW | scripts/test_check_internal_links.py | 70 | def test_closes_fence_only_with_a_long_enough_matching_delimiter(self): | CODE |
| LOW | .github/check_links.py | 242 | def _generate_markdown_report(self): | CODE |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 386 | def create_custom_flamegraph_script(self, original_script, custom_script): | CODE |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 437 | def generate_single_flamegraph(self, output_prefix): | CODE |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 632 | def generate_individual_thread_analysis(self, analysis_file, tid, thread_data, combined_stacks, role): | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 156 | def profile_individual_threads(self, threads): | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 213 | def _profile_thread_oncpu_worker(self, tid, thread_data): | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 237 | def _profile_thread_offcpu_worker(self, tid, thread_data): | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 277 | def normalize_and_combine_stacks(self): | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 494 | def generate_multithread_flamegraphs(self, output_prefix): | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 684 | def generate_thread_analysis_file(self, output_dir, base_name): | CODE |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 798 | def generate_single_thread_analysis_file(self, output_prefix, single_thread_times): | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 937 | def _create_vocab_sentencepiece(self): | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 2248 | def _ffn_mult_to_intermediate_size(ffn_mult: float, n_embd: int) -> int: | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 3476 | def shuffle_attn_output_weight(self, data_torch): | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 3860 | def _xlmroberta_tokenizer_init(self) -> None: | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 6602 | def meta_with_dtype_and_shape(cls, dtype: torch.dtype, shape: tuple[int, ...]) -> Tensor: | CODE |
| LOW | src/42-xdp-loadbalancer/simple_http_server.py | 12 | class SimpleHTTPRequestHandler(http.server.SimpleHTTPRequestHandler): | CODE |
| LOW | src/52-fsession-latency/tests/test_fsession_latency.py | 92 | def generate_continuous_reads() -> None: | CODE |
| LOW | src/50-tcx/tests/test_tcx_demo.py | 42 | def generate_loopback_traffic() -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check_internal_links.py | 85 | CODE | |
| LOW | scripts/check_internal_links.py | 146 | CODE | |
| LOW | scripts/generate_toc.py | 5 | CODE | |
| LOW | scripts/generate_toc.py | 138 | CODE | |
| LOW | .github/check_links.py | 77 | CODE | |
| LOW | .github/check_links.py | 155 | CODE | |
| LOW | .github/check_links.py | 289 | CODE | |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 494 | CODE | |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 548 | CODE | |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 565 | CODE | |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 600 | CODE | |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 684 | CODE | |
| LOW | …xec-image-inspector/tests/test_exec_image_inspector.py | 73 | CODE | |
| LOW | src/xpu/flamegraph/cupti_trace_parser.py | 34 | CODE | |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 67 | CODE | |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 131 | CODE | |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 189 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 6712 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 153 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 256 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 622 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 937 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 1132 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 1548 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 1758 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 1951 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 2010 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 2260 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 2386 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 2476 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 2855 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 3102 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 3218 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 3403 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 3542 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 3720 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 3869 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 4457 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 5057 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 5201 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 5293 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 5383 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 5489 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 5627 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 5764 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 6010 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 6241 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 6387 | CODE | |
| LOW | src/xpu/flamegraph/qwen3.cu/header.py | 18 | CODE | |
| LOW | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 39 | CODE | |
| LOW | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 58 | CODE | |
| LOW | src/53-egress-pacer/tests/test_egress_pacer.py | 62 | CODE | |
| LOW | src/53-egress-pacer/tests/test_egress_pacer.py | 83 | CODE | |
| LOW | src/53-egress-pacer/tests/test_egress_pacer.py | 111 | CODE | |
| LOW | src/52-fsession-latency/tests/test_fsession_latency.py | 26 | CODE | |
| LOW | src/50-tcx/tests/test_tcx_demo.py | 21 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/test-bpftrace.yml | 53 | # Check if bpftrace successfully attached and traced the function | COMMENT |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 429 | # Check if multi-threaded | COMMENT |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 39 | # Check if tools exist | COMMENT |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 125 | # Check if multi-threaded first | COMMENT |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 868 | # Check if running as root | STRING |
| LOW⚡ | src/32-wallclock-profiler/wallclock_profiler.py | 873 | # Check if PID exists | STRING |
| LOW | src/32-wallclock-profiler/tests/run_combined_test.sh | 33 | # Check if running as root | COMMENT |
| LOW | src/32-wallclock-profiler/tests/run_memory_bandwidth.sh | 41 | # Check if running as root | COMMENT |
| LOW | src/32-wallclock-profiler/tests/run_multithread_test.sh | 39 | # Check if running as root | COMMENT |
| LOW | src/48-energy/energy_monitor_traditional.sh | 119 | # Check if we should exit | COMMENT |
| LOW | src/48-energy/compare_monitors.sh | 10 | # Check if we're running as root (required for eBPF) | COMMENT |
| LOW | src/xpu/flamegraph/gpuperf.py | 125 | # Check if injection library exists (only if we're doing GPU profiling) | COMMENT |
| LOW⚡ | src/xpu/flamegraph/gpuperf.py | 332 | # Check if first argument is 'convert' for conversion mode | COMMENT |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 227 | # Check if counts match for sequential matching | COMMENT |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 277 | # Check if GPU exhausted | COMMENT |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 283 | # Check if current GPU is within window | COMMENT |
| LOW | src/cgroup/test.sh | 55 | # Check if running as root | COMMENT |
| LOW | src/42-xdp-loadbalancer/setup.sh | 101 | # Check if all interfaces are up and running | COMMENT |
| LOW | src/42-xdp-loadbalancer/setup.sh | 145 | # Check if firewall rules are blocking traffic | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/xpu/flamegraph/README.md | 216 | # Step 1: Find the cudaLaunchKernel runtime call that happened | COMMENT |
| LOW | src/xpu/flamegraph/README.md | 230 | # Step 2: Use the correlation ID from the launch event to find the | COMMENT |
| LOW | src/xpu/flamegraph/README.md | 343 | ### Step 1: Build the CUPTI Injection Library | COMMENT |
| LOW | src/xpu/flamegraph/README.md | 367 | ### Step 2: Build the Rust eBPF Profiler | COMMENT |
| LOW | src/xpu/flamegraph/README.md | 396 | ### Step 3: Build the Mock LLM Application | COMMENT |
| LOW | src/xpu/flamegraph/README.md | 426 | ### Step 4: Build the Real LLM Inference Application | COMMENT |
| LOW | src/xpu/flamegraph/README.md | 529 | ### Step 5: Generate the Flamegraph | COMMENT |
| LOW | src/features/bpf_token/README.md | 149 | ### Step 1: Fork and Create Namespaces | COMMENT |
| LOW | src/features/bpf_token/README.md | 163 | ### Step 2: Create bpffs and Configure Delegation | COMMENT |
| LOW | src/features/bpf_token/README.md | 184 | ### Step 3: Mount and Load | COMMENT |
| LOW | src/50-tcx/README.md | 125 | ### Step 1: Attach the First Program | COMMENT |
| LOW | src/50-tcx/README.md | 134 | ### Step 2: Insert the Second Program Before the First | COMMENT |
| LOW | src/50-tcx/README.md | 149 | ### Step 3: Query the Chain | COMMENT |
| LOW | src/50-tcx/README.md | 169 | ### Step 4: Stay Attached and Observe Traffic | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …production-tutorial/scripts/test_sync_source_blocks.py | 4 | CODE | |
| LOW | …-bpf-production-tutorial/scripts/sync-source-blocks.py | 4 | CODE | |
| LOW | scripts/check_internal_links.py | 4 | CODE | |
| LOW | scripts/generate_compatibility.py | 4 | CODE | |
| LOW | .github/check_links.py | 24 | CODE | |
| LOW | .github/check_links.py | 24 | CODE | |
| LOW | .github/check_links.py | 26 | CODE | |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 19 | CODE | |
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 21 | CODE | |
| LOW | …xec-image-inspector/tests/test_exec_image_inspector.py | 4 | CODE | |
| LOW | src/51-tcp-quarantine/tests/test_tcp_quarantine.py | 4 | CODE | |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 13 | CODE | |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 13 | CODE | |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 13 | CODE | |
| LOW | src/xpu/flamegraph/merge_gpu_cpu_trace.py | 13 | CODE | |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 4 | CODE | |
| LOW | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 3 | CODE | |
| LOW | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 6 | CODE | |
| LOW | src/53-egress-pacer/tests/test_egress_pacer.py | 4 | CODE | |
| LOW | src/52-fsession-latency/tests/test_fsession_latency.py | 4 | CODE | |
| LOW | src/50-tcx/tests/test_tcx_demo.py | 4 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/xpu/flamegraph/gpuperf.py | 224 | except: | CODE |
| HIGH | src/xpu/flamegraph/gpuperf.py | 294 | except: | CODE |
| HIGH | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 4560 | except KeyError: | CODE |
| HIGH | src/xpu/flamegraph/qwen3.cu/extract_v_m.py | 82 | except: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/generate_toc.py | 4 | # Define a function to walk through the directory and generate the TOC structure | COMMENT |
| MEDIUM | scripts/generate_toc.py | 137 | # Define a function to walk through the directory and generate the TOC structure in Chinese | COMMENT |
| MEDIUM | src/32-wallclock-profiler/wallclock_profiler.py | 353 | # Create a custom flamegraph script with our color palette | COMMENT |
| MEDIUM | src/cgroup/test.sh | 90 | # Create a temp file outside the test for output (since /dev/null is blocked in cgroup) | COMMENT |
| MEDIUM | src/42-xdp-loadbalancer/setup.sh | 56 | # Create the lb namespace | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/18-further-reading/README.zh.md | 91 | ## SPRIGHT: extracting the server from serverless computing! high-performance eBPF-based event-driven, shared-memory pro | COMMENT |
| MEDIUM | src/18-further-reading/README.md | 93 | ## SPRIGHT: extracting the server from serverless computing! high-performance eBPF-based event-driven, shared-memory pro | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 858 | def _set_vocab_none(self) -> None: | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 861 | def _set_vocab_gpt2(self) -> None: | CODE |
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 4103 | def set_vocab(self) -> None: | CODE |
| LOW | src/xpu/flamegraph/qwen3.cu/header.py | 5 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/32-wallclock-profiler/tests/test_multithread.c | 246 | "Request %d chunk %d: Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n", | CODE |
| LOW | src/32-wallclock-profiler/tests/test_multithread.c | 246 | "Request %d chunk %d: Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/rename.py | 27 | # Example usage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/32-wallclock-profiler/wallclock_profiler.py | 341 | # If no normalization needed, just add off-CPU stacks as-is | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 646 | # To avoid unexpected issues - we make sure to normalize non-normalized tokens | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 4461 | # TODO: implement self.prediction_coefs.weight.clamp_(...) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …/xpu/flamegraph/qwen3.cu/convert_hf_to_gguf_ordered.py | 84 | CODE |