diff options
author | 2020-02-18 23:02:39 +0000 | |
---|---|---|
committer | 2020-02-18 23:02:39 +0000 | |
commit | 49a46bc34b124b69a2be0a3ede342059d7308d1d (patch) | |
tree | 8f735366bf313fd698eabb7c657deee1644590bf | |
parent | 8ab1fe5e4050b8c12f2e4a293b01b02d379b2187 (diff) | |
parent | c6f093abedd6f9688a35b14be7a3ab46046bc1bd (diff) |
Merge "libtimeinstate: open programs read-only" am: c6f093abed
Change-Id: I3eb46ed458f87f6944031f0004056cbda6b59bbc
-rw-r--r-- | libs/cputimeinstate/cputimeinstate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/cputimeinstate/cputimeinstate.cpp b/libs/cputimeinstate/cputimeinstate.cpp index 05a462e026..a03775bdbf 100644 --- a/libs/cputimeinstate/cputimeinstate.cpp +++ b/libs/cputimeinstate/cputimeinstate.cpp @@ -156,7 +156,7 @@ static bool initGlobals() { static bool attachTracepointProgram(const std::string &eventType, const std::string &eventName) { std::string path = StringPrintf(BPF_FS_PATH "prog_time_in_state_tracepoint_%s_%s", eventType.c_str(), eventName.c_str()); - int prog_fd = bpf_obj_get(path.c_str()); + int prog_fd = bpfFdGet(path.c_str(), BPF_F_RDONLY); if (prog_fd < 0) return false; return bpf_attach_tracepoint(prog_fd, eventType.c_str(), eventName.c_str()) >= 0; } |