---
# System prepended metadata

title: 'Profiling and Introspection, December 9, 2022'
tags: [' profiling', unikraft]

---

---
title: "Profiling and Introspection, December 9, 2022"
tags: unikraft, profiling
datetime: 2022-12-09T15:00:00+02:00
location: Online, Discord (https://bit.ly/UnikraftDiscord), the `#monkey-business` voice channel
teams:
- profiling
participants:
- Marc
- Gabi
- RăzvanD
---

## :dart: Agenda

- Steps for introspection and benchmarking

## :closed_book: Discussions

MR: Memory consumption is more difficult.

MR: Boot time is important.
But it requires some tracepoint to be added.

MR: It doesn't make sense to face a fixed tracepoint for a C main function.

MR: A good tool is an internal hooking mechanism.
`ukhook` - you would give it a function name so that function is called beforehand.

MR: With `ukhook` we could hook into the main of the application.
For Firecracker we could trigger this boot-timer.

MR: For the old way of doing it, it wasn't really generic.

MR: What might be also a thing to consider is to be able to remove this hooks at runtime.
You could install this hook at install and then you deinstall it.

MR: The more flexibile way is to do it a runtime.
Compiling it could be easier.

MR: You would probably define a C function where you define some functions.
You could have some header and define the symbols and function hooks.

## :wrench: TODOs and Decisions

GM: Look in `kprobes` and in other hooking libraries.

GM: Provide a proposal of when / where to do hooking and how to specify the functions to hook (config, build, run time).