OSDN Git Service

Merge "Crypto performance benchmark" into nyc-dev
[android-x86/system-extras.git] / simpleperf / get_test_data.h
1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef SIMPLE_PERF_GET_TEST_DATA_H_
18 #define SIMPLE_PERF_GET_TEST_DATA_H_
19
20 #include <string>
21
22 #include "build_id.h"
23
24 std::string GetTestData(const std::string& filename);
25 const std::string& GetTestDataDir();
26
27 bool IsRoot();
28
29 static const std::string PERF_DATA = "perf.data";
30 static const std::string CALLGRAPH_FP_PERF_DATA = "perf_g_fp.data";
31 static const std::string BRANCH_PERF_DATA = "perf_b.data";
32
33 static const std::string ELF_FILE = "elf";
34
35 static const std::string APK_FILE = "data/app/com.example.hellojni-1/base.apk";
36 static const std::string NATIVELIB_IN_APK = "lib/arm64-v8a/libhello-jni.so";
37 static const std::string NATIVELIB_IN_APK_PERF_DATA = "has_embedded_native_libs_apk_perf.data";
38
39 constexpr size_t NATIVELIB_OFFSET_IN_APK = 0x8000;
40 constexpr size_t NATIVELIB_SIZE_IN_APK = 0x15d8;
41
42 static BuildId elf_file_build_id("0b12a384a9f4a3f3659b7171ca615dbec3a81f71");
43
44 static BuildId native_lib_build_id("b46f51cb9c4b71fb08a2fdbefc2c187894f14008");
45
46 #endif  // SIMPLE_PERF_GET_TEST_DATA_H_