iovisor / iovisor/bcc

Argument list to `BPF_HASH()` too long when using offcpu.py example

Open
#1,471 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Hi there, I'm trying to write a similar cpu profiling script as to the offcpu one in this repo. At the moment, I'm using the actual offcpu script, and I am getting

```
error: could not open bpf map: Argument list too long is maps/hash map type enabled in your kernel?

BPF_HASH(counts, struct key_t);
^
```

1. This error message strikes me as odd, since if it is that the argument list is too long, why would it matter if I have the type enabled in my kernel.

2. Is it actually that I need to enable the type or is the argument list actually too long?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the offcpu.py example and the BPF_HASH(counts, struct key_t) declaration shown in the report. Reproduce the failure, then trace where the error is emitted and compare the wording with the kernel map-support check; done means the cause is identified and the diagnostic or documentation clearly distinguishes the two cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, python
Domain
observability-sre, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.