Skip to content

Improve script efficiency #1

@jvimal

Description

@jvimal

Currently, mininet tracing uses kernel ftrace in sysfs to log trace output, by using "cat" and reading ASCII from kernel space, and flushing it to disk periodically (whatever "cat" does). A full blown ASCII is perhaps the least efficient representation of a tracing event, which is often just a few integers and maybe a 32 character string (for container/task name).

The "perf" utility (in linux-git/tools/perf) is built to efficiently log these tracing events. E.g. workflow:

# insmod mntracer.ko
# cd /tmp
# perf record -a -e mininet:* sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.128 MB perf.data (~5589 samples) ]
# perf script
... shows same output

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions