OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
simpleperf: report symbols of native libraries in apk file.
[android-x86/system-extras.git]
/
simpleperf
/
runtest
/
comm_change.cpp
1
#include <sys/prctl.h>
2
3
constexpr int LOOP_COUNT = 100000000;
4
5
void Function1() {
6
for (volatile int i = 0; i < LOOP_COUNT; ++i) {
7
}
8
}
9
10
int main() {
11
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>("RUN_COMM1"), 0, 0, 0);
12
Function1();
13
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>("RUN_COMM2"), 0, 0, 0);
14
Function1();
15
return 0;
16
}