forked from bpftrace/bpftrace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmapkey.h
42 lines (31 loc) · 894 Bytes
/
mapkey.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <string>
#include <vector>
#include <cereal/access.hpp>
#include "types.h"
namespace bpftrace {
class BPFtrace;
class MapKey
{
public:
std::vector<SizedType> args_;
bool operator!=(const MapKey &k) const;
size_t size() const;
std::string argument_type_list() const;
std::vector<std::string> argument_value_list(
BPFtrace &bpftrace,
const std::vector<uint8_t> &data) const;
std::string argument_value_list_str(BPFtrace &bpftrace,
const std::vector<uint8_t> &data) const;
private:
static std::string argument_value(BPFtrace &bpftrace,
const SizedType &arg,
const void *data);
friend class cereal::access;
template <typename Archive>
void serialize(Archive &archive)
{
archive(args_);
}
};
} // namespace bpftrace