Lines Matching refs:alloc

1332     AllocationDetails *alloc = LookUpAllocation(alloc_addr);  in CaptureScriptInvokeForEachMulti()  local
1333 if (!alloc) in CaptureScriptInvokeForEachMulti()
1334 alloc = CreateAllocation(alloc_addr); in CaptureScriptInvokeForEachMulti()
1336 if (alloc) { in CaptureScriptInvokeForEachMulti()
1338 if (alloc->address.isValid()) { in CaptureScriptInvokeForEachMulti()
1340 assert(*alloc->address.get() == alloc_addr); in CaptureScriptInvokeForEachMulti()
1342 alloc->address = alloc_addr; in CaptureScriptInvokeForEachMulti()
1347 if (alloc->context.isValid() && in CaptureScriptInvokeForEachMulti()
1348 *alloc->context.get() != addr_t(args[eRsContext])) in CaptureScriptInvokeForEachMulti()
1352 alloc->context = addr_t(args[eRsContext]); in CaptureScriptInvokeForEachMulti()
1438 AllocationDetails *alloc = CreateAllocation(uint64_t(args[eRsAlloc])); in CaptureAllocationInit() local
1439 if (alloc) in CaptureAllocationInit()
1440 alloc->context = uint64_t(args[eRsContext]); in CaptureAllocationInit()
1835 bool RenderScriptRuntime::JITDataPointer(AllocationDetails *alloc, in JITDataPointer() argument
1840 if (!alloc->address.isValid()) { in JITDataPointer()
1849 *alloc->address.get(), x, y, z); in JITDataPointer()
1863 alloc->data_ptr = data_ptr; in JITDataPointer()
1871 bool RenderScriptRuntime::JITTypePointer(AllocationDetails *alloc, in JITTypePointer() argument
1875 if (!alloc->address.isValid() || !alloc->context.isValid()) { in JITTypePointer()
1884 *alloc->context.get(), *alloc->address.get()); in JITTypePointer()
1898 alloc->type_ptr = type_ptr; in JITTypePointer()
1906 bool RenderScriptRuntime::JITTypePacked(AllocationDetails *alloc, in JITTypePacked() argument
1910 if (!alloc->type_ptr.isValid() || !alloc->context.isValid()) { in JITTypePacked()
1931 *alloc->context.get(), bits, *alloc->type_ptr.get()); in JITTypePacked()
1950 alloc->dimension = dims; in JITTypePacked()
1953 alloc->element.element_ptr = element_ptr; in JITTypePacked()
2107 bool RenderScriptRuntime::JITAllocationSize(AllocationDetails *alloc, in JITAllocationSize() argument
2111 if (!alloc->address.isValid() || !alloc->dimension.isValid() || in JITAllocationSize()
2112 !alloc->data_ptr.isValid() || !alloc->element.datum_size.isValid()) { in JITAllocationSize()
2118 uint32_t dim_x = alloc->dimension.get()->dim_1; in JITAllocationSize()
2119 uint32_t dim_y = alloc->dimension.get()->dim_2; in JITAllocationSize()
2120 uint32_t dim_z = alloc->dimension.get()->dim_3; in JITAllocationSize()
2125 if (alloc->element.children.size() > 0) { in JITAllocationSize()
2133 alloc->size = dim_x * dim_y * dim_z * *alloc->element.datum_size.get(); in JITAllocationSize()
2136 __FUNCTION__, *alloc->size.get()); in JITAllocationSize()
2149 *alloc->address.get(), dim_x, dim_y, dim_z); in JITAllocationSize()
2164 alloc->size = static_cast<uint32_t>(mem_ptr - *alloc->data_ptr.get()) + in JITAllocationSize()
2165 *alloc->element.datum_size.get(); in JITAllocationSize()
2173 bool RenderScriptRuntime::JITAllocationStride(AllocationDetails *alloc, in JITAllocationStride() argument
2177 if (!alloc->address.isValid() || !alloc->data_ptr.isValid()) { in JITAllocationStride()
2186 *alloc->address.get(), 0, 1, 0); in JITAllocationStride()
2200 alloc->stride = static_cast<uint32_t>(mem_ptr - *alloc->data_ptr.get()); in JITAllocationStride()
2206 bool RenderScriptRuntime::RefreshAllocation(AllocationDetails *alloc, in RefreshAllocation() argument
2209 if (!JITDataPointer(alloc, frame_ptr)) in RefreshAllocation()
2213 if (!JITTypePointer(alloc, frame_ptr)) in RefreshAllocation()
2217 if (!JITTypePacked(alloc, frame_ptr)) in RefreshAllocation()
2221 if (!JITElementPacked(alloc->element, *alloc->context.get(), frame_ptr)) in RefreshAllocation()
2225 SetElementSize(alloc->element); in RefreshAllocation()
2228 return JITAllocationSize(alloc, frame_ptr); in RefreshAllocation()
2362 RenderScriptRuntime::GetAllocationData(AllocationDetails *alloc, in GetAllocationData() argument
2367 if (alloc->ShouldRefresh()) { in GetAllocationData()
2371 if (!RefreshAllocation(alloc, frame_ptr)) { in GetAllocationData()
2377 assert(alloc->data_ptr.isValid() && alloc->element.type.isValid() && in GetAllocationData()
2378 alloc->element.type_vec_size.isValid() && alloc->size.isValid() && in GetAllocationData()
2382 const uint32_t size = *alloc->size.get(); in GetAllocationData()
2392 lldb::addr_t data_ptr = *alloc->data_ptr.get(); in GetAllocationData()
2415 AllocationDetails *alloc = FindAllocByID(strm, alloc_id); in LoadAllocation() local
2416 if (!alloc) in LoadAllocation()
2420 *alloc->address.get()); in LoadAllocation()
2423 if (alloc->ShouldRefresh()) { in LoadAllocation()
2427 if (!RefreshAllocation(alloc, frame_ptr)) { in LoadAllocation()
2433 assert(alloc->data_ptr.isValid() && alloc->element.type.isValid() && in LoadAllocation()
2434 alloc->element.type_vec_size.isValid() && alloc->size.isValid() && in LoadAllocation()
2435 alloc->element.datum_size.isValid() && in LoadAllocation()
2487 if (*alloc->element.datum_size.get() != root_el_hdr.element_size) { in LoadAllocation()
2490 root_el_hdr.element_size, *alloc->element.datum_size.get()); in LoadAllocation()
2495 const uint32_t alloc_type = static_cast<uint32_t>(*alloc->element.type.get()); in LoadAllocation()
2537 const uint32_t alloc_size = *alloc->size.get(); in LoadAllocation()
2548 lldb::addr_t alloc_data = *alloc->data_ptr.get(); in LoadAllocation()
2558 alloc->id); in LoadAllocation()
2635 AllocationDetails *alloc = FindAllocByID(strm, alloc_id); in SaveAllocation() local
2636 if (!alloc) in SaveAllocation()
2640 *alloc->address.get()); in SaveAllocation()
2643 if (alloc->ShouldRefresh()) { in SaveAllocation()
2647 if (!RefreshAllocation(alloc, frame_ptr)) { in SaveAllocation()
2653 assert(alloc->data_ptr.isValid() && alloc->element.type.isValid() && in SaveAllocation()
2654 alloc->element.type_vec_size.isValid() && in SaveAllocation()
2655 alloc->element.datum_size.get() && in SaveAllocation()
2656 alloc->element.type_kind.isValid() && alloc->dimension.isValid() && in SaveAllocation()
2675 const std::shared_ptr<uint8_t> buffer = GetAllocationData(alloc, frame_ptr); in SaveAllocation()
2685 head.dims[0] = static_cast<uint32_t>(alloc->dimension.get()->dim_1); in SaveAllocation()
2686 head.dims[1] = static_cast<uint32_t>(alloc->dimension.get()->dim_2); in SaveAllocation()
2687 head.dims[2] = static_cast<uint32_t>(alloc->dimension.get()->dim_3); in SaveAllocation()
2689 const size_t element_header_size = CalculateElementHeaderSize(alloc->element); in SaveAllocation()
2719 PopulateElementHeaders(element_header_buffer, 0, alloc->element); in SaveAllocation()
2734 num_bytes = static_cast<size_t>(*alloc->size.get()); in SaveAllocation()
3151 AllocationDetails *alloc = nullptr; in FindAllocByID() local
3156 alloc = m_allocations[alloc_id - 1].get(); in FindAllocByID()
3157 return alloc; in FindAllocByID()
3163 alloc = a.get(); in FindAllocByID()
3168 if (alloc == nullptr) { in FindAllocByID()
3174 return alloc; in FindAllocByID()
3184 AllocationDetails *alloc = FindAllocByID(strm, id); in DumpAllocation() local
3185 if (!alloc) in DumpAllocation()
3189 *alloc->address.get()); in DumpAllocation()
3192 if (alloc->ShouldRefresh()) { in DumpAllocation()
3197 if (!RefreshAllocation(alloc, frame_ptr)) { in DumpAllocation()
3205 const uint32_t vec_size = *alloc->element.type_vec_size.get(); in DumpAllocation()
3206 const Element::DataType type = *alloc->element.type.get(); in DumpAllocation()
3221 const uint32_t data_size = *alloc->element.datum_size.get(); in DumpAllocation()
3227 std::shared_ptr<uint8_t> buffer = GetAllocationData(alloc, frame_ptr); in DumpAllocation()
3236 if (!alloc->stride.isValid()) { in DumpAllocation()
3237 if (alloc->dimension.get()->dim_2 == 0) // We only have one dimension in DumpAllocation()
3238 alloc->stride = 0; in DumpAllocation()
3239 else if (!JITAllocationStride(alloc, frame_ptr)) { in DumpAllocation()
3245 const uint32_t stride = *alloc->stride.get(); in DumpAllocation()
3246 const uint32_t size = *alloc->size.get(); // Size of whole allocation in DumpAllocation()
3248 alloc->element.padding.isValid() ? *alloc->element.padding.get() : 0; in DumpAllocation()
3255 uint32_t dim_x = alloc->dimension.get()->dim_1; in DumpAllocation()
3258 uint32_t dim_y = alloc->dimension.get()->dim_2; in DumpAllocation()
3261 uint32_t dim_z = alloc->dimension.get()->dim_3; in DumpAllocation()
3286 (alloc->element.children.size() > 0) && in DumpAllocation()
3287 (alloc->element.type_name != Element::GetFallbackStructName())) { in DumpAllocation()
3300 alloc->element.type_name.AsCString(), in DumpAllocation()
3301 *alloc->data_ptr.get() + offset); in DumpAllocation()
3335 for (auto &alloc : m_allocations) { in RecomputeAllAllocations() local
3337 if (!RefreshAllocation(alloc.get(), frame_ptr)) { in RecomputeAllAllocations()
3340 alloc->id); in RecomputeAllAllocations()
3361 for (auto &alloc : m_allocations) { in ListAllocations() local
3363 if (index != 0 && index != alloc->id) in ListAllocations()
3367 if (alloc->ShouldRefresh() && !RefreshAllocation(alloc.get(), frame_ptr)) { in ListAllocations()
3369 alloc->id); in ListAllocations()
3374 strm.Printf("%" PRIu32 ":", alloc->id); in ListAllocations()
3379 if (!alloc->context.isValid()) in ListAllocations()
3382 strm.Printf("0x%" PRIx64 "\n", *alloc->context.get()); in ListAllocations()
3385 if (!alloc->address.isValid()) in ListAllocations()
3388 strm.Printf("0x%" PRIx64 "\n", *alloc->address.get()); in ListAllocations()
3391 if (!alloc->data_ptr.isValid()) in ListAllocations()
3394 strm.Printf("0x%" PRIx64 "\n", *alloc->data_ptr.get()); in ListAllocations()
3397 if (!alloc->dimension.isValid()) in ListAllocations()
3401 alloc->dimension.get()->dim_1, alloc->dimension.get()->dim_2, in ListAllocations()
3402 alloc->dimension.get()->dim_3); in ListAllocations()
3405 if (!alloc->element.type.isValid() || in ListAllocations()
3406 !alloc->element.type_vec_size.isValid()) in ListAllocations()
3409 const int vector_size = *alloc->element.type_vec_size.get(); in ListAllocations()
3410 Element::DataType type = *alloc->element.type.get(); in ListAllocations()
3412 if (!alloc->element.type_name.IsEmpty()) in ListAllocations()
3413 strm.Printf("%s\n", alloc->element.type_name.AsCString()); in ListAllocations()
3435 if (!alloc->element.type_kind.isValid()) in ListAllocations()
3438 const Element::DataKind kind = *alloc->element.type_kind.get(); in ListAllocations()