blob: deb3b1d5262c92f141766b55975d6fa5c0920e36 [file] [log] [blame]
Yabin Cui3c8c2132015-08-13 20:30:20 -07001/*
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// Add fake functions to build successfully on darwin.
Elliott Hughes66dd09e2015-12-04 14:00:57 -080018#include <android-base/logging.h>
Yabin Cui3c8c2132015-08-13 20:30:20 -070019
Yabin Cui516a87c2018-03-26 17:34:00 -070020#include "read_dex_file.h"
Yabin Cui3c8c2132015-08-13 20:30:20 -070021#include "environment.h"
Yabin Cui03381452017-12-13 11:31:53 -080022#include "OfflineUnwinder.h"
Yabin Cui3c8c2132015-08-13 20:30:20 -070023
Yabin Cui3c8c2132015-08-13 20:30:20 -070024bool GetKernelBuildId(BuildId*) {
25 return false;
26}
Yabin Cuif8974522017-07-17 14:36:37 -070027
28bool CanRecordRawData() {
29 return false;
30}
Yabin Cui516a87c2018-03-26 17:34:00 -070031
Yabin Cui2a53ff32018-05-21 17:37:00 -070032bool ReadSymbolsFromDexFileInMemory(void*, uint64_t, const std::vector<uint64_t>&,
33 std::vector<DexFileSymbol>*) {
34 return true;
35}
36
Yabin Cui516a87c2018-03-26 17:34:00 -070037bool ReadSymbolsFromDexFile(const std::string&, const std::vector<uint64_t>&,
38 std::vector<DexFileSymbol>*) {
39 return true;
40}
Yabin Cui5ac7a252019-07-18 10:43:32 -070041
Yabin Cuia22efeb2020-01-29 13:27:33 -080042const char* GetTraceFsDir() {
43 return nullptr;
44}
45
Yabin Cui5ac7a252019-07-18 10:43:32 -070046namespace simpleperf {
47
48class DummyOfflineUnwinder : public OfflineUnwinder {
49 public:
50 bool UnwindCallChain(const ThreadEntry&, const RegSet&, const char*, size_t,
51 std::vector<uint64_t>*, std::vector<uint64_t>*) override {
52 return false;
53 }
54};
55
56std::unique_ptr<OfflineUnwinder> OfflineUnwinder::Create(bool) {
57 return std::unique_ptr<OfflineUnwinder>(new DummyOfflineUnwinder);
58}
59
60} // namespace simpleperf