Skip to content
Snippets Groups Projects
Commit 51c749a9 authored by Nadav Har'El's avatar Nadav Har'El
Browse files

Allow using floats and double values in tracepoints


The new scheduling algorithm is based on floating point runtimes,
and I'd like to be able to tracepoints to debug it.

Adding floats and doubles is trivial - we just need to tell the C++
tracing code to use the character "f" for floats and "d" for doubles,
and Python (run in gdb when we use "osv trace") already knows how to unpack
values with these designations.

Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
parent c7903f04
No related branches found
No related tags found
No related merge requests found
...@@ -144,6 +144,16 @@ struct signature_char<bool> { ...@@ -144,6 +144,16 @@ struct signature_char<bool> {
static const char sig = '?'; static const char sig = '?';
}; };
template <>
struct signature_char<float> {
static const char sig = 'f';
};
template <>
struct signature_char<double> {
static const char sig = 'd';
};
template <typename T> template <typename T>
struct signature_char<T*> { struct signature_char<T*> {
static const char sig = 'P'; static const char sig = 'P';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment