Skip to content
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
bcc/tools/
bcc/tools/

Latest commit

Commit 77f5252 ("tools/deadlock: support specifies maxnum of threads
and edge cases (#3455)") allow to set the maximum number of threads
and edge cases to be able to reduce the memory usage of the deadlock
tool. It however let the size of the map of stack traces fixed. It's
current size, 640k (actually rounded up to 1M) takes 1Gb of vmalloced
kernel memory.

This patch adds an option to make the maximum number of stack traces
user defined. It also set the default value to 64k, in line with the
current default for the number of edge cases and threads.

It fix the following issue on system with limited memory ressources:
could not open bpf map: stack_traces, error: Cannot allocate memory
Traceback (most recent call last):
  File "/tmp/./deadlock.py", line 577, in <module>
    main()
  File "/tmp/./deadlock.py", line 489, in main
    bpf = BPF(text=text)
  File "/usr/lib/python3.9/site-packages/bcc/__init__.py", line 479, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
5c146cc

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
February 7, 2016 00:46
February 6, 2016 17:08
February 15, 2016 22:24
February 10, 2016 01:38
February 10, 2016 01:36
February 12, 2016 02:29
February 12, 2016 02:27
February 9, 2016 00:32
May 1, 2022 12:17
April 16, 2021 12:20
April 4, 2023 13:07
February 13, 2016 21:07
December 30, 2020 07:42
September 11, 2020 11:05
September 12, 2017 08:13
February 10, 2016 01:34
September 19, 2022 16:50
February 9, 2016 00:31
October 10, 2018 11:48
October 10, 2018 11:48
October 10, 2018 11:48
October 10, 2018 11:48
January 7, 2022 10:34
September 16, 2020 22:56
July 8, 2022 10:11
February 12, 2016 02:25
February 12, 2016 02:23
February 14, 2016 23:14
February 14, 2016 23:13