/developtools/profiler/device/plugins/native_hook/test/ |
D | statistics_test.cpp | 56 char* ptr = static_cast<char*>(calloc(1, MALLOC_SIZE / 100)); in CallocFun() local 57 if (ptr == nullptr) { in CallocFun() 62 free(ptr); in CallocFun() 69 char* ptr = static_cast<char*>(calloc(1, MALLOC_SIZE / 10)); // 10: multiple num in ReallocFun() local 70 if (ptr == nullptr) { in ReallocFun() 74 ptr = static_cast<char*>(realloc(ptr, MALLOC_SIZE * 10)); // 10: multiple num in ReallocFun() 75 if (ptr == nullptr) { in ReallocFun() 80 free(ptr); in ReallocFun() 90 char* ptr = static_cast<char*>(malloc(mallocSize)); in DepthMallocFree() local 91 if (ptr == nullptr) { in DepthMallocFree() [all …]
|
/developtools/profiler/hidebug/frameworks/native/ |
D | hidebug_base.c | 142 const char *ptr = param; in GetMallocHookStartupValue() local 144 while (*ptr && *ptr != ':') { in GetMallocHookStartupValue() 145 ++ptr; in GetMallocHookStartupValue() 147 if (*ptr == ':') { in GetMallocHookStartupValue() 148 ++ptr; in GetMallocHookStartupValue() 152 if (*ptr == '\"') { in GetMallocHookStartupValue() 153 ++ptr; in GetMallocHookStartupValue() 155 while (idx < size - 1 && *ptr && *ptr != '\"') { in GetMallocHookStartupValue() 156 path[idx++] = *ptr++; in GetMallocHookStartupValue() 161 while (idx < size - 1 && *ptr) { in GetMallocHookStartupValue() [all …]
|
/developtools/profiler/device/plugins/native_hook/test/unittest/ |
D | hook_socket_client_test.cpp | 55 auto ptr = reinterpret_cast<const int8_t*>(&config); variable 57 ASSERT_TRUE(hookClient.ProtocolProc(socketContext, 0, ptr, size)); 71 auto ptr = reinterpret_cast<const int8_t*>(&config); variable 73 ASSERT_TRUE(hookClient.ProtocolProc(socketContext, 0, ptr, size)); 99 auto ptr = reinterpret_cast<const int8_t*>(&clientConfig); variable 102 ASSERT_TRUE(hookClient.ProtocolProc(socketContext, 0, ptr, size)); 115 auto ptr = reinterpret_cast<const int8_t*>(&clientConfig); variable 118 ASSERT_TRUE(hookClient.ProtocolProc(socketContext, 0, ptr, size));
|
/developtools/profiler/hiebpf/include/ |
D | hiebpf_macros.h | 123 #define container_of(ptr, type, member) \ argument 125 void *__mptr = (void *)(ptr); \ 147 #define list_entry(ptr, type, member) \ argument 148 container_of(ptr, type, member) 152 #define hlist_entry(ptr, type, member) container_of(ptr, type, member) argument
|
D | hhlog.h | 187 #define CHECK_NOTNULL(ptr, retval, fmt, ...) … argument 189 …if (ptr == nullptr) { … 190 HHLOGE(true, "CHECK_NOTNULL(%s) in %s:%d FAILED, " fmt, #ptr, __func__, \
|
/developtools/profiler/host/smartperf/trace_streamer/src/base/sqlite_ext/ |
D | sqlite_ext_funcs.cpp | 29 StdevCtx* ptr = static_cast<StdevCtx*>(sqlite3_aggregate_context(context, 0)); in sqliteExtStdevFinalize() local 30 if (ptr && ptr->cntValue > 1) { in sqliteExtStdevFinalize() 31 sqlite3_result_double(context, sqrt(ptr->rSValue / (ptr->cntValue - 1))); in sqliteExtStdevFinalize() 42 StdevCtx* ptr = static_cast<StdevCtx*>(sqlite3_aggregate_context(context, sizeof(StdevCtx))); in sqliteExtStdevNextStep() local 44 ptr->cntValue++; in sqliteExtStdevNextStep() 46 double deltaValue = (x - ptr->rMValue); in sqliteExtStdevNextStep() 47 ptr->rMValue += deltaValue / ptr->cntValue; in sqliteExtStdevNextStep() 48 ptr->rSValue += deltaValue * (x - ptr->rMValue); in sqliteExtStdevNextStep() 353 [](void* ptr) { delete static_cast<JsonBuild*>(ptr); }); in ts_create_extend_function() argument
|
/developtools/smartperf_host/trace_streamer/src/base/sqlite_ext/ |
D | sqlite_ext_funcs.cpp | 29 StdevCtx* ptr = static_cast<StdevCtx*>(sqlite3_aggregate_context(context, 0)); in sqliteExtStdevFinalize() local 30 if (ptr && ptr->cntValue > 1) { in sqliteExtStdevFinalize() 31 sqlite3_result_double(context, sqrt(ptr->rSValue / (ptr->cntValue - 1))); in sqliteExtStdevFinalize() 42 StdevCtx* ptr = static_cast<StdevCtx*>(sqlite3_aggregate_context(context, sizeof(StdevCtx))); in sqliteExtStdevNextStep() local 44 ptr->cntValue++; in sqliteExtStdevNextStep() 46 double deltaValue = (x - ptr->rMValue); in sqliteExtStdevNextStep() 47 ptr->rMValue += deltaValue / ptr->cntValue; in sqliteExtStdevNextStep() 48 ptr->rSValue += deltaValue * (x - ptr->rMValue); in sqliteExtStdevNextStep() 353 [](void* ptr) { delete static_cast<JsonBuild*>(ptr); }); in ts_create_extend_function() argument
|
/developtools/profiler/host/smartperf/client/client_command/ |
D | sp_utils.cpp | 95 struct dirent *ptr = readdir(dir); in ForDirFiles() local 96 if (ptr == nullptr) { in ForDirFiles() 101 if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0)) { in ForDirFiles() 103 } else if (ptr->d_type == DT_DIR) { in ForDirFiles() 104 pathStringWithDelimiter = IncludePathDelimiter(path) + std::string(ptr->d_name); in ForDirFiles() 107 files.push_back(IncludePathDelimiter(path) + std::string(ptr->d_name)); in ForDirFiles() 220 struct dirent *ptr = readdir(dir); in GetCpuInfo() local 221 if (ptr == nullptr) { in GetCpuInfo() 224 if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0)) { in GetCpuInfo() 227 policyFiles.push_back(IncludePathDelimiter(basePath) + std::string(ptr->d_name)); in GetCpuInfo()
|
/developtools/profiler/host/smartperf/trace_streamer/src/protos/types/plugins/ftrace_data/default/ |
D | kmem.proto | 24 uint64 ptr = 2; field 30 uint64 ptr = 2; field 39 uint64 ptr = 2; field 49 uint64 ptr = 2; field 58 uint64 ptr = 2; field 68 uint64 ptr = 2; field
|
/developtools/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/ |
D | kmem.proto | 24 uint64 ptr = 2; field 30 uint64 ptr = 2; field 39 uint64 ptr = 2; field 49 uint64 ptr = 2; field 58 uint64 ptr = 2; field 68 uint64 ptr = 2; field
|
/developtools/profiler/protos/types/plugins/ftrace_data/default/ |
D | kmem.proto | 24 uint64 ptr = 2; field 30 uint64 ptr = 2; field 39 uint64 ptr = 2; field 49 uint64 ptr = 2; field 58 uint64 ptr = 2; field 68 uint64 ptr = 2; field
|
/developtools/profiler/host/smartperf/trace_streamer/src/protos/types/plugins/ftrace_data/ |
D | kmem.proto | 24 uint64 ptr = 2; field 30 uint64 ptr = 2; field 39 uint64 ptr = 2; field 49 uint64 ptr = 2; field 58 uint64 ptr = 2; field 68 uint64 ptr = 2; field
|
/developtools/smartperf_host/trace_streamer/src/protos/types/plugins/ftrace_data/default/ |
D | kmem.proto | 24 uint64 ptr = 2; field 30 uint64 ptr = 2; field 39 uint64 ptr = 2; field 49 uint64 ptr = 2; field 58 uint64 ptr = 2; field 68 uint64 ptr = 2; field
|
/developtools/profiler/device/services/shared_memory/src/ |
D | share_memory_block.cpp | 65 auto ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in CreateBlockWithFd() local 66 if (ptr == MAP_FAILED) { in CreateBlockWithFd() 75 memoryPoint_ = ptr; in CreateBlockWithFd() 79 header_ = reinterpret_cast<BlockHeader*>(ptr); in CreateBlockWithFd() 102 auto ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in CreateBlock() local 103 if (ptr == MAP_FAILED) { in CreateBlock() 113 memoryPoint_ = ptr; in CreateBlock() 117 header_ = reinterpret_cast<BlockHeader*>(ptr); in CreateBlock() 337 auto ptr = GetDataPoint(); in TakeData() local 338 CHECK_TRUE(func(ptr, size), false, "call func FAILED!"); in TakeData()
|
/developtools/profiler/device/plugins/api/src/ |
D | plugin_watcher.cpp | 107 char* ptr = nullptr; in MonitorIsSet() local 113 … for (ptr = buffer; ptr < buffer + readLength; ptr += sizeof(struct inotify_event) + event->len) { in MonitorIsSet() 114 event = reinterpret_cast<const struct inotify_event*>(ptr); in MonitorIsSet()
|
/developtools/profiler/device/base/src/ |
D | common.cpp | 105 struct dirent* ptr; in IsProcessExist() local 107 while ((ptr = readdir(dir)) != nullptr) { in IsProcessExist() 108 if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0)) { in IsProcessExist() 111 if ((!isdigit(*ptr->d_name)) || ptr->d_type != DT_DIR) { in IsProcessExist() 115 …int len = snprintf_s(filePath, FILE_PATH_SIZE, FILE_PATH_SIZE - 1, "/proc/%s/cmdline", ptr->d_name… in IsProcessExist() 139 pidValue = atoi(ptr->d_name); in IsProcessExist()
|
D | epoll_event_poller.cpp | 106 event.data.ptr = ctx.get(); in UpdateEvent() 132 auto ctx = reinterpret_cast<EventContext*>(eventVec[i].data.ptr); in Run()
|
/developtools/profiler/device/plugins/native_hook/src/ |
D | runtime_stack_range.cpp | 160 static bool IfContained(const char* start, const char* end, const char* ptr) in IfContained() argument 162 bool ret = (ptr >= start && ptr < end); in IfContained()
|
D | hook_client.cpp | 439 void* hook_realloc(void* (*fn)(void*, size_t), void* ptr, size_t size) in hook_realloc() argument 443 pRet = fn(ptr, size); in hook_realloc() 511 freeData.addr = ptr; in hook_realloc() 524 size_t hook_malloc_usable_size(size_t (*fn)(void*), void* ptr) in hook_malloc_usable_size() argument 528 ret = fn(ptr); in hook_malloc_usable_size() 891 void* ohos_malloc_hook_realloc(void* ptr, size_t size) in ohos_malloc_hook_realloc() argument 894 void* ret = hook_realloc(GetDispatch()->realloc, ptr, size); in ohos_malloc_hook_realloc()
|
/developtools/hiperf/demo/cpp/ |
D | hiperf_example_cmd.cpp | 129 int *ptr = arr; in LoopMmap() local 133 *ptr = someVal1; in LoopMmap() 134 ++ptr; in LoopMmap() 135 *ptr = someVal2; in LoopMmap() 136 ++ptr; in LoopMmap() 137 *ptr = someVal3; in LoopMmap()
|
/developtools/profiler/hiebpf/test/unittest/ |
D | ringbuffer_test.cpp | 386 char* ptr = reinterpret_cast<char *>(&num); variable 387 auto len = ringBuffer->Put(ptr, sizeof(ptr)); 388 EXPECT_EQ(len, sizeof(ptr)); 395 for (int i = sizeof(ptr) + 1; i < RingBuffer::BufferSize::DEFAULT_SIZE - 1; i++) { 406 len = ringBuffer->Put(ptr, sizeof(ptr)); 407 EXPECT_EQ(len, sizeof(ptr));
|
/developtools/profiler/device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_formatters/ |
D | ftrace_kmem_event_formatter.cpp | 33 …_s(buffer, BUFFER_SIZE, BUFFER_SIZE - 1, "kfree: call_site=%p ptr=%p", msg.call_site(), msg.ptr()); in __anonbd07003d0302() 48 msg.ptr(), msg.bytes_req(), msg.bytes_alloc(), in __anonbd07003d0502() 120 msg.call_site(), msg.ptr(), msg.bytes_req(), msg.bytes_alloc(), in __anonbd07003d0702() 193 msg.call_site(), msg.ptr(), msg.bytes_req(), msg.bytes_alloc(), in __anonbd07003d0902() 266 msg.call_site(), msg.ptr(), msg.bytes_req(), msg.bytes_alloc(), in __anonbd07003d0b02() 339 … BUFFER_SIZE, BUFFER_SIZE - 1, "kmem_cache_free: call_site=%p ptr=%p", msg.call_site(), msg.ptr()); in __anonbd07003d0d02()
|
/developtools/profiler/device/base/include/ |
D | logging.h | 196 #define CHECK_NOTNULL(ptr, retval, fmt, ...) … argument 198 …if (ptr == nullptr) { … 199 HILOG_WARN(LOG_CORE, "CHECK_NOTNULL(%s) in %s:%d FAILED, " fmt, #ptr, __func__, \
|
/developtools/profiler/device/services/profiler_service/src/ |
D | profiler_service.cpp | 40 #define CHECK_POINTER_NOTNULL(ptr, errorMessage) \ argument 42 if ((ptr) == nullptr) { \ 43 HILOG_ERROR(LOG_CORE, "%s: FAILED, %s is null!", __func__, #ptr); \ 366 auto ptr = it->second; in GetSessionContext() local 367 return ptr; in GetSessionContext() 377 auto ptr = it->second; in RemoveSessionContext() local 378 HILOG_INFO(LOG_CORE, "DelCtx use_count: %ld", ptr.use_count()); in RemoveSessionContext()
|
/developtools/hdc/src/common/ |
D | auth.cpp | 410 void *ptr = nullptr; in AuthVerify() local 413 while (KeylistIncrement(&listPublicKey, authKeyIndex, &ptr)) { in AuthVerify() 415 if (!RSAPublicKey2RSA((const uint8_t *)ptr, &rsa)) { in AuthVerify()
|