Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions .github/actions/setup-thapi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ runs:
packages: gcc g++ ruby ruby-dev elfutils libelf-dev libpopt-dev libdw-dev libprotobuf-dev protobuf-compiler valgrind libc6-dbg libglib2.0-dev libnuma-dev llvm-dev
- name: Install Ruby Dependencies
shell: bash
# metababel 2.0.0 is a breaking release: it replaced the MIP-0
# `length_field_path` this branch emits with a MIP-1 field location. Pin to
# the series matching configure.ac's `metababel >= 1.1.3` until THAPI moves
# to MIP 1.
run: sudo gem install nokogiri babeltrace2 opencl_ruby_ffi 'metababel:~> 1.1' cast-to-yaml
run: sudo gem install nokogiri opencl_ruby_ffi metababel cast-to-yaml
- name: Install babeltrace2-ruby
shell: bash
# The published gem (0.1.5) predates BLOB support, so it cannot read the
# traces THAPI now writes. Build it from the branch until a release
# carries those commits.
run: |
git clone --depth 1 https://github.com/argonne-lcf/babeltrace2-ruby.git
cd babeltrace2-ruby
gem build babeltrace2.gemspec
sudo gem install --local ./babeltrace2-*.gem
- name: Set PKG_CONFIG
shell: bash
run: |
Expand All @@ -70,10 +76,8 @@ runs:
shell: bash
if: steps.efficios_dep.outputs.cache-hit != 'true'
run: |
git clone https://github.com/lttng/lttng-ust -b v2.14.0
git clone https://github.com/lttng/lttng-ust -b v2.16.0
cd lttng-ust
wget https://raw.githubusercontent.com/argonne-lcf/THAPI-spack/a57eb4fa1b2b8621bb0e83a6ec25e48e3a761d15/packages/lttng-ust/55cca69.diff
patch -p1 < 55cca69.diff
./bootstrap
./configure --disable-man-pages --prefix=$HOME/efficios_dep/
make -j$(nproc)
Expand All @@ -82,7 +86,7 @@ runs:
shell: bash
if: steps.efficios_dep.outputs.cache-hit != 'true'
run: |
git clone https://github.com/argonne-lcf/lttng-tools.git -b anl-v2.14.0
git clone https://github.com/argonne-lcf/lttng-tools.git -b anl-v2.16.0
cd lttng-tools
./bootstrap
./configure --disable-man-pages --disable-bin-lttng-crash --prefix=$HOME/efficios_dep
Expand All @@ -92,15 +96,8 @@ runs:
shell: bash
if: steps.efficios_dep.outputs.cache-hit != 'true'
run: |
git clone https://github.com/argonne-lcf/babeltrace.git -b anl-ms3
# TODO use anl-ms3-v2.1.2 when ctf.archive.reader doesn't segfault anymore
git clone https://github.com/argonne-lcf/babeltrace.git -b anl-ms3-v2.1.2
cd babeltrace
# Fix include path
wget https://raw.githubusercontent.com/argonne-lcf/THAPI/4418916620496fd66cde0b3d5e241bed0a4c18a3/.github/workflows/bt_makefile.patch
patch -p1 < bt_makefile.patch
# Null char
wget https://raw.githubusercontent.com/argonne-lcf/THAPI-spack/ddc9a12a498331a7c312941df0d4e7078d03ae93/packages/babeltrace2/0001-Prevent-null-character-from-stopping-string-decoding.patch
patch -p1 < 0001-Prevent-null-character-from-stopping-string-decoding.patch
./bootstrap
./configure --disable-man-pages --prefix=$HOME/efficios_dep
make -j$(nproc)
Expand Down
83 changes: 41 additions & 42 deletions backends/cuda/cuda_events.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,67 @@
---
lttng_ust_cuda_args:
events:
- name: arg_count
args:
- [ CUfunction, f ]
- [ size_t, argCount ]
- [CUfunction, f]
- [size_t, argCount]
fields:
- [ ctf_integer_hex, uintptr_t, f, "(uintptr_t)f" ]
- [ ctf_integer, size_t, argCount, argCount ]
- [ctf_integer_hex, uintptr_t, f, "(uintptr_t)f"]
- [ctf_integer, size_t, argCount, argCount]
- name: arg_value
args:
- [ CUfunction, f ]
- [ size_t, argIndex ]
- [ "void *", kernelParam ]
- [ size_t, argSize ]
- [CUfunction, f]
- [size_t, argIndex]
- ["void *", kernelParam]
- [size_t, argSize]
fields:
- [ ctf_integer_hex, uintptr_t, f, "(uintptr_t)f" ]
- [ ctf_integer, size_t, argIndex, argIndex ]
- [ ctf_integer_hex, uintptr_t, kernelParam, "(uintptr_t)kernelParam" ]
- [ ctf_sequence_text, uint8_t, kernelParam_val, "(uint8_t *)kernelParam", size_t, "kernelParam ? argSize : 0" ]
- [ctf_integer_hex, uintptr_t, f, "(uintptr_t)f"]
- [ctf_integer, size_t, argIndex, argIndex]
- [ctf_integer_hex, uintptr_t, kernelParam, "(uintptr_t)kernelParam"]
- [lttng_ust_field_variable_length_blob, kernelParam_val, "(uint8_t *)kernelParam", size_t, "kernelParam ? argSize : 0"]
lttng_ust_cuda_profiling:
events:
- name: event_profiling
args:
- [ CUevent, hStart ]
- [ CUevent, hStop ]
- [CUevent, hStart]
- [CUevent, hStop]
fields:
- [ ctf_integer_hex, uintptr_t, hStart, "(uintptr_t)hStart" ]
- [ ctf_integer_hex, uintptr_t, hStop, "(uintptr_t)hStop" ]
- [ctf_integer_hex, uintptr_t, hStart, "(uintptr_t)hStart"]
- [ctf_integer_hex, uintptr_t, hStop, "(uintptr_t)hStop"]
- name: event_profiling_results
args:
- [ CUevent, hStart ]
- [ CUevent, hStop ]
- [ CUresult, startStatus ]
- [ CUresult, stopStatus ]
- [ CUresult, status ]
- [ float, milliseconds ]
- [CUevent, hStart]
- [CUevent, hStop]
- [CUresult, startStatus]
- [CUresult, stopStatus]
- [CUresult, status]
- [float, milliseconds]
fields:
- [ ctf_integer_hex, uintptr_t, hStart, "(uintptr_t)hStart" ]
- [ ctf_integer_hex, uintptr_t, hStop, "(uintptr_t)hStop" ]
- [ ctf_integer, CUresult, startStatus, startStatus ]
- [ ctf_integer, CUresult, stopStatus, stopStatus ]
- [ ctf_integer, CUresult, status, status ]
- [ ctf_float, float, milliseconds, milliseconds ]
- [ctf_integer_hex, uintptr_t, hStart, "(uintptr_t)hStart"]
- [ctf_integer_hex, uintptr_t, hStop, "(uintptr_t)hStop"]
- [ctf_integer, CUresult, startStatus, startStatus]
- [ctf_integer, CUresult, stopStatus, stopStatus]
- [ctf_integer, CUresult, status, status]
- [ctf_float, float, milliseconds, milliseconds]
lttng_ust_cuda_exports:
events:
- name: export_called
args:
- [ CUuuid *, pExportTableId ]
- [ size_t, exportOffset ]
- [CUuuid *, pExportTableId]
- [size_t, exportOffset]
fields:
- [ ctf_integer_hex, uintptr_t, pExportTableId, "(uintptr_t)pExportTableId" ]
- [ ctf_integer_hex, size_t, exportOffset, exportOffset ]
- [ ctf_sequence_text, uint8_t, pExportTableId_val, pExportTableId, size_t, "sizeof(CUuuid)" ]
- [ctf_integer_hex, uintptr_t, pExportTableId, "(uintptr_t)pExportTableId"]
- [ctf_integer_hex, size_t, exportOffset, exportOffset]
- [lttng_ust_field_variable_length_blob, pExportTableId_val, pExportTableId, size_t, "sizeof(CUuuid)"]
lttng_ust_cuda_properties:
events:
- name: device
args:
- [ int, ordinal ]
- [ CUdevice , device ]
- [ char *, name ]
- [ CUuuid *, uuid ]
- [int, ordinal]
- [CUdevice, device]
- [char *, name]
- [CUuuid *, uuid]
fields:
- [ ctf_integer, int, ordinal, ordinal ]
- [ ctf_integer_hex, int, device, device ]
- [ ctf_string, name, name ]
- [ ctf_sequence_text, uint8_t, uuid, uuid, size_t, "sizeof(CUuuid)" ]
- [ctf_integer, int, ordinal, ordinal]
- [ctf_integer_hex, int, device, device]
- [ctf_string, name, name]
- [lttng_ust_field_variable_length_blob, uuid, uuid, size_t, "sizeof(CUuuid)"]
22 changes: 11 additions & 11 deletions backends/cuda/cuda_meta_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ meta_parameters:
cuMipmappedArrayGetLevel:
- [OutScalar, pLevelArray]
cuMemGetHandleForAddressRange:
- [OutLTTng, handle, ctf_sequence_text, uint8_t, handle_val, handle, size_t, "handleType == CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD ? sizeof(int) : 0"]
- [OutLTTng, handle, lttng_ust_field_variable_length_blob, handle_val, handle, size_t, "handleType == CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD ? sizeof(int) : 0"]
cuMemAddressReserve:
- [OutScalar, ptr]
cuMemCreate:
Expand All @@ -311,10 +311,10 @@ meta_parameters:
- [InScalar, location]
- [OutScalar, flags]
cuMemExportToShareableHandle:
- [OutLTTng, shareableHandle, ctf_sequence_text, uint8_t, shareableHandle_val, shareableHandle, size_t, "handleType == CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR ? sizeof(int) : 0"]
- [OutLTTng, shareableHandle, lttng_ust_field_variable_length_blob, shareableHandle_val, shareableHandle, size_t, "handleType == CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR ? sizeof(int) : 0"]
cuMemImportFromShareableHandle:
- [OutScalar, handle]
- [InLTTng, osHandle, ctf_sequence_text, uint8_t, osHandle_val, osHandle, size_t, "shHandleType == CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR ? sizeof(int) : 0"]
- [InLTTng, osHandle, lttng_ust_field_variable_length_blob, osHandle_val, osHandle, size_t, "shHandleType == CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR ? sizeof(int) : 0"]
cuMemGetAllocationGranularity:
- [InScalar, prop]
- [OutScalar, granularity]
Expand All @@ -327,15 +327,15 @@ meta_parameters:
cuMemAllocAsync_ptsz:
- [OutScalar, dptr]
cuMemPoolSetAttribute:
- [InLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "\
- [InLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "\
attr == CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES ? sizeof(int) : \
attr == CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC ? sizeof(int) : \
attr == CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES ? sizeof(int) : \
attr == CU_MEMPOOL_ATTR_RELEASE_THRESHOLD ? sizeof(cuuint64_t) : \
attr == CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH ? sizeof(cuuint64_t) : \
attr == CU_MEMPOOL_ATTR_USED_MEM_HIGH ? sizeof(cuuint64_t) : 0"]
cuMemPoolGetAttribute:
- [OutLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "\
- [OutLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "\
attr == CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES ? sizeof(int) : \
attr == CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC ? sizeof(int) : \
attr == CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES ? sizeof(int) : \
Expand All @@ -357,9 +357,9 @@ meta_parameters:
cuMemAllocFromPoolAsync_ptsz:
- [OutScalar, dptr]
cuMemPoolExportToShareableHandle:
- [OutLTTng, handle_out, ctf_sequence_text, uint8_t, handle_out_val, handle_out, size_t, "handleType == CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR ? sizeof(int) : 0"]
- [OutLTTng, handle_out, lttng_ust_field_variable_length_blob, handle_out_val, handle_out, size_t, "handleType == CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR ? sizeof(int) : 0"]
cuMemPoolImportFromShareableHandle:
- [InLTTng, handle, ctf_sequence_text, uint8_t, handle_val, handle, size_t, "handleType == CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR ? sizeof(int) : 0"]
- [InLTTng, handle, lttng_ust_field_variable_length_blob, handle_val, handle, size_t, "handleType == CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR ? sizeof(int) : 0"]
- [OutScalar, pool_out]
cuMemPoolExportPointer:
- [OutScalar, shareData_out]
Expand All @@ -373,7 +373,7 @@ meta_parameters:
- [InScalar, prop]
- [OutScalar, granularity]
cuPointerGetAttribute:
- [OutLTTng, data, ctf_sequence_text, uint8_t, data_val, data, size_t, "\
- [OutLTTng, data, lttng_ust_field_variable_length_blob, data_val, data, size_t, "\
attribute == CU_POINTER_ATTRIBUTE_CONTEXT ? sizeof(CUcontext) : \
attribute == CU_POINTER_ATTRIBUTE_MEMORY_TYPE ? sizeof(unsigned int) : \
attribute == CU_POINTER_ATTRIBUTE_DEVICE_POINTER ? sizeof(CUdeviceptr) : \
Expand All @@ -400,7 +400,7 @@ meta_parameters:
- [InArray, attributes, numAttributes]
- [InArray, dataSizes, numAttributes]
cuPointerSetAttribute:
- [InLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "attribute == CU_POINTER_ATTRIBUTE_SYNC_MEMOPS ? sizeof(uint8_t) : 0"]
- [InLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "attribute == CU_POINTER_ATTRIBUTE_SYNC_MEMOPS ? sizeof(uint8_t) : 0"]
cuPointerGetAttributes:
- [InArray, attributes, numAttributes]
- [OutArray, data, numAttributes]
Expand Down Expand Up @@ -626,13 +626,13 @@ meta_parameters:
cuGraphMemFreeNodeGetParams:
- [OutScalar, dptr_out]
cuDeviceGetGraphMemAttribute:
- [OutLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "\
- [OutLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "\
attr == CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT ? sizeof(cuuint64_t) : \
attr == CU_GRAPH_MEM_ATTR_USED_MEM_HIGH ? sizeof(cuuint64_t) : \
attr == CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT ? sizeof(cuuint64_t) : \
attr == CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH ? sizeof(cuuint64_t) : 0"]
cuDeviceSetGraphMemAttribute:
- [InLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "\
- [InLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "\
attr == CU_GRAPH_MEM_ATTR_USED_MEM_HIGH ? sizeof(cuuint64_t) : \
attr == CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH ? sizeof(cuuint64_t) : 0"]
cuGraphClone:
Expand Down
18 changes: 9 additions & 9 deletions backends/hip/hip_meta_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ meta_parameters:
hipPointerGetAttributes:
- [OutScalar, attributes]
hipPointerGetAttribute:
- [OutLTTng, data, ctf_sequence_text, uint8_t, data_val, data, size_t, "\
- [OutLTTng, data, lttng_ust_field_variable_length_blob, data_val, data, size_t, "\
attribute == HIP_POINTER_ATTRIBUTE_CONTEXT ? 0 : \
attribute == HIP_POINTER_ATTRIBUTE_MEMORY_TYPE ? sizeof(unsigned int) : \
attribute == HIP_POINTER_ATTRIBUTE_DEVICE_POINTER ? sizeof(hipDeviceptr_t) : \
Expand Down Expand Up @@ -146,7 +146,7 @@ meta_parameters:
hipMallocAsync:
- [OutScalar, dev_ptr]
hipMemPoolSetAttribute:
- [InLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "\
- [InLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "\
attr == hipMemPoolReuseFollowEventDependencies ? sizeof(int) : \
attr == hipMemPoolReuseAllowOpportunistic ? sizeof(int) : \
attr == hipMemPoolReuseAllowInternalDependencies ? sizeof(int) : \
Expand All @@ -156,7 +156,7 @@ meta_parameters:
attr == hipMemPoolAttrUsedMemCurrent ? 0 : \
attr == hipMemPoolAttrUsedMemHigh ? 0 : 0"]
hipMemPoolGetAttribute:
- [OutLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "\
- [OutLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "\
attr == hipMemPoolReuseFollowEventDependencies ? sizeof(int) : \
attr == hipMemPoolReuseAllowOpportunistic ? sizeof(int) : \
attr == hipMemPoolReuseAllowInternalDependencies ? sizeof(int) : \
Expand All @@ -176,10 +176,10 @@ meta_parameters:
hipMallocFromPoolAsync:
- [OutScalar, dev_ptr]
hipMemPoolExportToShareableHandle:
- [OutLTTng, shared_handle, ctf_sequence_text, uint8_t, shared_handle_val, shared_handle, size_t, "\
- [OutLTTng, shared_handle, lttng_ust_field_variable_length_blob, shared_handle_val, shared_handle, size_t, "\
handle_type == hipMemHandleTypePosixFileDescriptor ? sizeof(int) : 0"]
hipMemPoolImportFromShareableHandle:
- [InLTTng, shared_handle, ctf_sequence_text, uint8_t, shared_handle_val, shared_handle, size_t, "\
- [InLTTng, shared_handle, lttng_ust_field_variable_length_blob, shared_handle_val, shared_handle, size_t, "\
handle_type == hipMemHandleTypePosixFileDescriptor ? sizeof(int) : 0"]
- [OutScalar, mem_pool]
hipMemPoolExportPointer:
Expand Down Expand Up @@ -516,13 +516,13 @@ meta_parameters:
hipGraphEventWaitNodeGetEvent:
- [OutScalar, event_out]
hipDeviceGetGraphMemAttribute:
- [OutLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "\
- [OutLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "\
attr == hipGraphMemAttrUsedMemCurrent ? sizeof(uint64_t) : \
attr == hipGraphMemAttrUsedMemHigh ? sizeof(uint64_t) : \
attr == hipGraphMemAttrReservedMemCurrent ? sizeof(uint64_t) : \
attr == hipGraphMemAttrReservedMemHigh ? sizeof(uint64_t) : 0"]
hipDeviceSetGraphMemAttribute:
- [InLTTng, value, ctf_sequence_text, uint8_t, value_val, value, size_t, "\
- [InLTTng, value, lttng_ust_field_variable_length_blob, value_val, value, size_t, "\
attr == hipGraphMemAttrUsedMemHigh ? sizeof(uint64_t) : \
attr == hipGraphMemAttrReservedMemHigh ? sizeof(uint64_t) : 0"]
hipUserObjectCreate:
Expand All @@ -533,7 +533,7 @@ meta_parameters:
- [InScalar, prop]
- [OutScalar, handle]
hipMemExportToShareableHandle:
- [OutLTTng, shareableHandle, ctf_sequence_text, uint8_t, shareableHandle_val, shareableHandle, size_t, "\
- [OutLTTng, shareableHandle, lttng_ust_field_variable_length_blob, shareableHandle_val, shareableHandle, size_t, "\
handleType == hipMemHandleTypePosixFileDescriptor ? sizeof(int) : 0"]
hipMemGetAccess:
- [InScalar, location]
Expand All @@ -544,7 +544,7 @@ meta_parameters:
hipMemGetAllocationPropertiesFromHandle:
- [OutScalar, prop]
hipMemImportFromShareableHandle:
- [InLTTng, osHandle, ctf_sequence_text, uint8_t, osHandle_val, osHandle, size_t, "\
- [InLTTng, osHandle, lttng_ust_field_variable_length_blob, osHandle_val, osHandle, size_t, "\
shHandleType == hipMemHandleTypePosixFileDescriptor ? sizeof(int) : 0"]
- [OutScalar, handle]
hipMemMapArrayAsync:
Expand Down
13 changes: 9 additions & 4 deletions backends/opencl/gen_babeltrace_cl_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ def parse_field(field)
d[:field_class][:type] = unsigned?(field['type']) ? 'integer_unsigned' : 'integer_signed'
d[:field_class][:field_value_range] = integer_size(field['type'], field['pointer'])
d[:field_class][:preferred_display_base] = 16 if field['lttng'] == 'ctf_integer_hex'
when 'ctf_string', 'ctf_sequence_text'
when 'ctf_string'
d[:field_class][:type] = 'string'
d[:metadata] = { be_class: cl_to_class(field['type']) } if field['structure']
when 'lttng_ust_field_variable_length_blob'
d[:field_class][:type] = 'blob_dynamic'
d[:field_class][:length_field_location] = payload_length_field_location(field['name'])
d[:field_class][:media_type] = LTTng::TracepointField.media_type(field['type'])
d[:metadata] = { be_class: cl_to_class(field['type']) } if field['structure']
when 'ctf_array'
d[:field_class][:type] = 'array_static'
d_field = parse_field({ 'lttng' => 'ctf_integer', 'type' => field['type'], 'pointer' => field['pointer'] })
Expand All @@ -65,13 +70,13 @@ def parse_field(field)
d[:field_class][:type] = 'array_dynamic'
d_field = parse_field({ 'lttng' => 'ctf_integer', 'type' => field['type'], 'pointer' => field['pointer'] })
d[:field_class][:element_field_class] = d_field[:field_class]
d[:field_class][:length_field_path] = "EVENT_PAYLOAD[\"_#{field['name']}_length\"]"
d[:field_class][:length_field_location] = payload_length_field_location(field['name'])

when 'ctf_sequence_hex'
d[:field_class][:type] = 'array_dynamic'
d_field = parse_field({ 'lttng' => 'ctf_integer_hex', 'type' => field['type'], 'pointer' => field['pointer'] })
d[:field_class][:element_field_class] = d_field[:field_class]
d[:field_class][:length_field_path] = "EVENT_PAYLOAD[\"_#{field['name']}_length\"]"
d[:field_class][:length_field_location] = payload_length_field_location(field['name'])
when 'ctf_enum'
d[:field_class][:type] = unsigned?(field['type']) ? 'enumeration_unsigned' : 'enumeration_signed'
enum_type = field['enum_type']
Expand Down Expand Up @@ -99,7 +104,7 @@ def parse_field(field)
parsed_field[:field_class][:element_field_class][:cast_type] = match[1]
end

if (field['array'] || field['structure']) && field['lttng'].match('ctf_sequence')
if (field['array'] || field['structure']) && implicit_length_field?(field['lttng'])

additional_parsed_field = parse_field({ 'name' => length_field_name(sub_name),
'lttng' => 'ctf_integer', 'type' => 'size_t' })
Expand Down
Loading
Loading