Commit 7524fca5 authored by Teng Qin's avatar Teng Qin

Use uintptr_t for addresses in C++ API

parent bd62f6c9
......@@ -215,7 +215,7 @@ private:
std::string name_;
std::string probe_func_;
std::vector<intptr_t> addresses_;
std::vector<uintptr_t> addresses_;
std::string program_text_;
......
......@@ -91,8 +91,8 @@ BPFStackTable::~BPFStackTable() {
bcc_free_symcache(it.second, it.first);
}
std::vector<intptr_t> BPFStackTable::get_stack_addr(int stack_id) {
std::vector<intptr_t> res;
std::vector<uintptr_t> BPFStackTable::get_stack_addr(int stack_id) {
std::vector<uintptr_t> res;
stacktrace_t stack;
if (!lookup(&stack_id, &stack))
return res;
......
......@@ -208,7 +208,7 @@ class BPFHashTable : public BPFTableBase<KeyType, ValueType> {
// From src/cc/export/helpers.h
static const int BPF_MAX_STACK_DEPTH = 127;
struct stacktrace_t {
intptr_t ip[BPF_MAX_STACK_DEPTH];
uintptr_t ip[BPF_MAX_STACK_DEPTH];
};
class BPFStackTable : public BPFTableBase<int, stacktrace_t> {
......@@ -217,7 +217,7 @@ class BPFStackTable : public BPFTableBase<int, stacktrace_t> {
: BPFTableBase<int, stacktrace_t>(desc) {}
~BPFStackTable();
std::vector<intptr_t> get_stack_addr(int stack_id);
std::vector<uintptr_t> get_stack_addr(int stack_id);
std::vector<std::string> get_stack_symbol(int stack_id, int pid);
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment