• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 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 #include "perfetto/heap_profile.h"
18 #include "src/profiling/memory/heap_profile_internal.h"
19 
20 #include <cinttypes>
21 
22 __attribute__((visibility("default"))) uint64_t
AHeapProfileEnableCallbackInfo_getSamplingInterval(const AHeapProfileEnableCallbackInfo *)23 AHeapProfileEnableCallbackInfo_getSamplingInterval(
24     const AHeapProfileEnableCallbackInfo*) {
25   return 0;
26 }
27 
AHeapInfo_create(const char *)28 __attribute__((visibility("default"))) AHeapInfo* AHeapInfo_create(
29     const char*) {
30   return nullptr;
31 }
32 
AHeapInfo_setEnabledCallback(AHeapInfo *,void (*)(void *,const AHeapProfileEnableCallbackInfo *),void *)33 __attribute__((visibility("default"))) AHeapInfo* AHeapInfo_setEnabledCallback(
34     AHeapInfo*,
35     void (*)(void*, const AHeapProfileEnableCallbackInfo*),
36     void*) {
37   return nullptr;
38 }
39 
AHeapInfo_setDisabledCallback(AHeapInfo *,void (*)(void *,const AHeapProfileDisableCallbackInfo *),void *)40 __attribute__((visibility("default"))) AHeapInfo* AHeapInfo_setDisabledCallback(
41     AHeapInfo*,
42     void (*)(void*, const AHeapProfileDisableCallbackInfo*),
43     void*) {
44   return nullptr;
45 }
46 
AHeapProfile_registerHeap(AHeapInfo *)47 __attribute__((visibility("default"))) uint32_t AHeapProfile_registerHeap(
48     AHeapInfo*) {
49   return 0;
50 }
51 
52 __attribute__((visibility("default"))) bool
AHeapProfile_reportAllocation(uint32_t,uint64_t,uint64_t)53 AHeapProfile_reportAllocation(uint32_t, uint64_t, uint64_t) {
54   return false;
55 }
56 
57 __attribute__((visibility("default"))) bool
AHeapProfile_reportSample(uint32_t,uint64_t,uint64_t)58 AHeapProfile_reportSample(uint32_t, uint64_t, uint64_t) {
59   return false;
60 }
61 
AHeapProfile_reportFree(uint32_t,uint64_t)62 __attribute__((visibility("default"))) void AHeapProfile_reportFree(uint32_t,
63                                                                     uint64_t) {}
64 
AHeapProfile_initSession(void * (*)(size_t),void (*)(void *))65 __attribute__((visibility("default"))) bool AHeapProfile_initSession(
66     void* (*)(size_t),
67     void (*)(void*)) {
68   return false;
69 }
70