예제 #1
0
def generate_code(args):
    from u_trace import utrace_generate
    from u_trace import utrace_generate_perfetto_utils

    utrace_generate(cpath=args.utrace_src, hpath=args.utrace_hdr,
                    ctx_param='struct intel_ds_device *dev')
    utrace_generate_perfetto_utils(hpath=args.perfetto_hdr)
예제 #2
0
    args=[
        Arg(type='uint8_t', var='uses_3d_blit', c_format='%u'),
        Arg(type='enum VkFormat',
            var='src_format',
            c_format='%s',
            to_prim_type='vk_format_description({})->short_name'),
        Arg(type='enum VkFormat',
            var='dst_format',
            c_format='%s',
            to_prim_type='vk_format_description({})->short_name'),
        Arg(type='uint8_t', var='layers', c_format='%u')
    ])

begin_end_tp('compute',
             args=[
                 Arg(type='uint8_t', var='indirect', c_format='%u'),
                 Arg(type='uint16_t', var='local_size_x', c_format='%u'),
                 Arg(type='uint16_t', var='local_size_y', c_format='%u'),
                 Arg(type='uint16_t', var='local_size_z', c_format='%u'),
                 Arg(type='uint16_t', var='num_groups_x', c_format='%u'),
                 Arg(type='uint16_t', var='num_groups_y', c_format='%u'),
                 Arg(type='uint16_t', var='num_groups_z', c_format='%u')
             ])

utrace_generate(cpath=args.utrace_src,
                hpath=args.utrace_hdr,
                ctx_param='struct tu_device *dev',
                trace_toggle_name='tu_gpu_tracepoint',
                trace_toggle_defaults=tu_default_tps)
utrace_generate_perfetto_utils(hpath=args.perfetto_hdr)
    args=[['const struct pipe_framebuffer_state *', 'pfb']],
    tp_struct=[['uint16_t', 'width', 'pfb->width'],
               ['uint16_t', 'height', 'pfb->height'],
               ['uint8_t', 'layers', 'pfb->layers'],
               ['uint8_t', 'samples', 'pfb->samples'],
               ['uint8_t', 'nr_cbufs', 'pfb->nr_cbufs']],
    tp_print=[
        '%ux%ux%u@%u, nr_cbufs: %u', '__entry->width', '__entry->height',
        '__entry->layers', '__entry->samples', '__entry->nr_cbufs'
    ],
)

Tracepoint(
    'grid_info',
    args=[['const struct pipe_grid_info *', 'pgrid']],
    tp_struct=[['uint8_t', 'work_dim', 'pgrid->work_dim'],
               ['uint16_t', 'block_x', 'pgrid->block[0]'],
               ['uint16_t', 'block_y', 'pgrid->block[1]'],
               ['uint16_t', 'block_z', 'pgrid->block[2]'],
               ['uint16_t', 'grid_x', 'pgrid->grid[0]'],
               ['uint16_t', 'grid_y', 'pgrid->grid[1]'],
               ['uint16_t', 'grid_z', 'pgrid->grid[2]']],
    tp_print=[
        'work_dim=%u, block=%ux%ux%u, grid=%ux%ux%u', '__entry->work_dim',
        '__entry->block_x', '__entry->block_y', '__entry->block_z',
        '__entry->grid_x', '__entry->grid_y', '__entry->grid_z'
    ],
)

utrace_generate(cpath=args.src, hpath=args.hdr)
예제 #4
0
Tracepoint('start_tile',
    args=[TracepointArg(type='uint16_t', var='bin_h', c_format='%u'),
          TracepointArg(type='uint16_t', var='yoff',  c_format='%u'),
          TracepointArg(type='uint16_t', var='bin_w', c_format='%u'),
          TracepointArg(type='uint16_t', var='xoff',  c_format='%u')],
    tp_print=['bin_h=%d, yoff=%d, bin_w=%d, xoff=%d',
        '__entry->bin_h', '__entry->yoff', '__entry->bin_w', '__entry->xoff'],
)

Tracepoint('start_draw_ib',
    tp_perfetto='fd_start_draw_ib')
Tracepoint('end_draw_ib',
    tp_perfetto='fd_end_draw_ib')

Tracepoint('start_blit',
    args=[TracepointArg(type='enum pipe_texture_target', var='src_target', c_format='%s', to_prim_type="util_str_tex_target({}, true)"),
          TracepointArg(type='enum pipe_texture_target', var='dst_target', c_format='%s', to_prim_type="util_str_tex_target({}, true)")],
    tp_print=['%s -> %s', 'util_str_tex_target(__entry->src_target, true)',
        'util_str_tex_target(__entry->dst_target, true)'],
    tp_perfetto='fd_start_blit',
)
Tracepoint('end_blit',
    tp_perfetto='fd_end_blit')

Tracepoint('start_compute',
    tp_perfetto='fd_start_compute')
Tracepoint('end_compute',
    tp_perfetto='fd_end_compute')

utrace_generate(cpath=args.src, hpath=args.hdr, ctx_param='struct pipe_context *pctx')
예제 #5
0
        Arg(type='uint8_t', var='uses_3d_blit', c_format='%u'),
        Arg(type='enum VkFormat',
            var='src_format',
            c_format='%s',
            to_prim_type='vk_format_description({})->short_name'),
        Arg(type='enum VkFormat',
            var='dst_format',
            c_format='%s',
            to_prim_type='vk_format_description({})->short_name'),
        Arg(type='uint8_t', var='layers', c_format='%u')
    ],
    tp_perfetto='tu_end_blit')

Tracepoint('start_compute', tp_perfetto='tu_start_compute')
Tracepoint('end_compute',
           args=[
               Arg(type='uint8_t', var='indirect', c_format='%u'),
               Arg(type='uint16_t', var='local_size_x', c_format='%u'),
               Arg(type='uint16_t', var='local_size_y', c_format='%u'),
               Arg(type='uint16_t', var='local_size_z', c_format='%u'),
               Arg(type='uint16_t', var='num_groups_x', c_format='%u'),
               Arg(type='uint16_t', var='num_groups_y', c_format='%u'),
               Arg(type='uint16_t', var='num_groups_z', c_format='%u')
           ],
           tp_perfetto='tu_end_compute')

utrace_generate(cpath=args.utrace_src,
                hpath=args.utrace_hdr,
                ctx_param='struct tu_device *dev')
utrace_generate_perfetto_utils(hpath=args.perfetto_hdr)
예제 #6
0
    tp_print=['fast_cleared: 0x%x', '__entry->fast_cleared'],
)

begin_end_tp('resolve')

singular_tp('start_tile',
    args=[TracepointArg(type='uint16_t', var='bin_h', c_format='%u'),
          TracepointArg(type='uint16_t', var='yoff',  c_format='%u'),
          TracepointArg(type='uint16_t', var='bin_w', c_format='%u'),
          TracepointArg(type='uint16_t', var='xoff',  c_format='%u')],
    tp_print=['bin_h=%d, yoff=%d, bin_w=%d, xoff=%d',
        '__entry->bin_h', '__entry->yoff', '__entry->bin_w', '__entry->xoff'],
)

begin_end_tp('draw_ib')

begin_end_tp('blit',
    args=[TracepointArg(type='enum pipe_texture_target', var='src_target', c_format='%s', to_prim_type="util_str_tex_target({}, true)"),
          TracepointArg(type='enum pipe_texture_target', var='dst_target', c_format='%s', to_prim_type="util_str_tex_target({}, true)")],
    tp_print=['%s -> %s', 'util_str_tex_target(__entry->src_target, true)',
        'util_str_tex_target(__entry->dst_target, true)'],
)

begin_end_tp('compute')

utrace_generate(cpath=args.src,
                hpath=args.hdr,
                ctx_param='struct pipe_context *pctx',
                trace_toggle_name='fd_gpu_tracepoint',
                trace_toggle_defaults=fd_default_tps)