Lines Matching full:metadata

79 	u64 **metadata;  member
119 /* Conversion between traceID and metadata pointers */
166 u64 *metadata; in cs_etm__get_magic() local
172 metadata = inode->priv; in cs_etm__get_magic()
173 *magic = metadata[CS_ETM_MAGIC]; in cs_etm__get_magic()
180 u64 *metadata; in cs_etm__get_cpu() local
186 metadata = inode->priv; in cs_etm__get_cpu()
187 *cpu = (int)metadata[CS_ETM_CPU]; in cs_etm__get_cpu()
207 static enum cs_etm_pid_fmt cs_etm__init_pid_fmt(u64 *metadata) in cs_etm__init_pid_fmt() argument
211 if (metadata[CS_ETM_MAGIC] == __perf_cs_etmv3_magic) { in cs_etm__init_pid_fmt()
212 val = metadata[CS_ETM_ETMCR]; in cs_etm__init_pid_fmt()
217 val = metadata[CS_ETMV4_TRCCONFIGR]; in cs_etm__init_pid_fmt()
244 /* Disallow re-mapping a different traceID to metadata pair. */ in cs_etm__insert_trace_id_node()
278 /* Not one we've seen before, associate the traceID with the metadata pointer */ in cs_etm__insert_trace_id_node()
340 * the correct trace ID into the metadata for setting up decoders later. in cs_etm__process_trace_id_v0()
424 * update metadata trace ID from the value found in the AUX_HW_INFO packet.
446 * Get a metadata index for a specific cpu from an array.
454 if (etm->metadata[i][CS_ETM_CPU] == (u64)cpu) { in get_cpu_data_idx()
463 * Get a metadata for a specific cpu from an array.
470 return (idx != -1) ? etm->metadata[idx] : NULL; in get_cpu_data()
500 /* get access to the etm metadata */ in cs_etm__process_aux_output_hw_id()
502 if (!etm || !etm->metadata) in cs_etm__process_aux_output_hw_id()
786 u64 *metadata, u32 etmidr) in cs_etm__set_trace_param_etmv3() argument
789 t_params->etmv3.reg_ctrl = metadata[CS_ETM_ETMCR]; in cs_etm__set_trace_param_etmv3()
790 t_params->etmv3.reg_trc_id = metadata[CS_ETM_ETMTRACEIDR]; in cs_etm__set_trace_param_etmv3()
794 u64 *metadata) in cs_etm__set_trace_param_etmv4() argument
797 t_params->etmv4.reg_idr0 = metadata[CS_ETMV4_TRCIDR0]; in cs_etm__set_trace_param_etmv4()
798 t_params->etmv4.reg_idr1 = metadata[CS_ETMV4_TRCIDR1]; in cs_etm__set_trace_param_etmv4()
799 t_params->etmv4.reg_idr2 = metadata[CS_ETMV4_TRCIDR2]; in cs_etm__set_trace_param_etmv4()
800 t_params->etmv4.reg_idr8 = metadata[CS_ETMV4_TRCIDR8]; in cs_etm__set_trace_param_etmv4()
801 t_params->etmv4.reg_configr = metadata[CS_ETMV4_TRCCONFIGR]; in cs_etm__set_trace_param_etmv4()
802 t_params->etmv4.reg_traceidr = metadata[CS_ETMV4_TRCTRACEIDR]; in cs_etm__set_trace_param_etmv4()
806 u64 *metadata) in cs_etm__set_trace_param_ete() argument
809 t_params->ete.reg_idr0 = metadata[CS_ETE_TRCIDR0]; in cs_etm__set_trace_param_ete()
810 t_params->ete.reg_idr1 = metadata[CS_ETE_TRCIDR1]; in cs_etm__set_trace_param_ete()
811 t_params->ete.reg_idr2 = metadata[CS_ETE_TRCIDR2]; in cs_etm__set_trace_param_ete()
812 t_params->ete.reg_idr8 = metadata[CS_ETE_TRCIDR8]; in cs_etm__set_trace_param_ete()
813 t_params->ete.reg_configr = metadata[CS_ETE_TRCCONFIGR]; in cs_etm__set_trace_param_ete()
814 t_params->ete.reg_traceidr = metadata[CS_ETE_TRCTRACEIDR]; in cs_etm__set_trace_param_ete()
815 t_params->ete.reg_devarch = metadata[CS_ETE_TRCDEVARCH]; in cs_etm__set_trace_param_ete()
824 u64 *metadata = inode->priv; in cs_etm__init_trace_params() local
825 u64 architecture = metadata[CS_ETM_MAGIC]; in cs_etm__init_trace_params()
830 etmidr = metadata[CS_ETM_ETMIDR]; in cs_etm__init_trace_params()
831 cs_etm__set_trace_param_etmv3(t_params++, metadata, etmidr); in cs_etm__init_trace_params()
834 cs_etm__set_trace_param_etmv4(t_params++, metadata); in cs_etm__init_trace_params()
837 cs_etm__set_trace_param_ete(t_params++, metadata); in cs_etm__init_trace_params()
970 /* First remove all traceID/metadata nodes for the RB tree */ in cs_etm__free_queue()
1007 zfree(&aux->metadata[i]); in cs_etm__free()
1009 zfree(&aux->metadata); in cs_etm__free()
1166 * Create an RB tree for traceID-metadata tuple. Since the conversion in cs_etm__alloc_queue()
2934 * fill out the nr_param value in the metadata we create.
2939 u64 *metadata = NULL; in cs_etm__create_meta_blk() local
2944 metadata = zalloc(sizeof(*metadata) * out_blk_size); in cs_etm__create_meta_blk()
2945 if (!metadata) in cs_etm__create_meta_blk()
2953 /* read version 0 info block into a version 1 metadata block */ in cs_etm__create_meta_blk()
2955 metadata[CS_ETM_MAGIC] = buff_in[i + CS_ETM_MAGIC]; in cs_etm__create_meta_blk()
2956 metadata[CS_ETM_CPU] = buff_in[i + CS_ETM_CPU]; in cs_etm__create_meta_blk()
2957 metadata[CS_ETM_NR_TRC_PARAMS] = nr_in_params; in cs_etm__create_meta_blk()
2960 metadata[k + 1] = buff_in[i + k]; in cs_etm__create_meta_blk()
2975 metadata[k] = buff_in[i + k]; in cs_etm__create_meta_blk()
2978 metadata[CS_ETM_NR_TRC_PARAMS] = nr_out_params - nr_cmn_params; in cs_etm__create_meta_blk()
2984 return metadata; in cs_etm__create_meta_blk()
3193 #define HAS_PARAM(j, type, param) (metadata[(j)][CS_ETM_NR_TRC_PARAMS] <= \
3200 static bool cs_etm__has_virtual_ts(u64 **metadata, int num_cpu) in cs_etm__has_virtual_ts() argument
3205 switch (metadata[j][CS_ETM_MAGIC]) { in cs_etm__has_virtual_ts()
3207 if (HAS_PARAM(j, ETMV4, TS_SOURCE) || metadata[j][CS_ETMV4_TS_SOURCE] != 1) in cs_etm__has_virtual_ts()
3211 if (HAS_PARAM(j, ETE, TS_SOURCE) || metadata[j][CS_ETE_TS_SOURCE] != 1) in cs_etm__has_virtual_ts()
3222 /* map trace ids to correct metadata block, from information in metadata */
3224 u64 **metadata) in cs_etm__map_trace_ids_metadata() argument
3231 cs_etm_magic = metadata[i][CS_ETM_MAGIC]; in cs_etm__map_trace_ids_metadata()
3234 metadata[i][CS_ETM_ETMTRACEIDR] &= CORESIGHT_TRACE_ID_VAL_MASK; in cs_etm__map_trace_ids_metadata()
3235 trace_chan_id = (u8)(metadata[i][CS_ETM_ETMTRACEIDR]); in cs_etm__map_trace_ids_metadata()
3239 metadata[i][CS_ETMV4_TRCTRACEIDR] &= CORESIGHT_TRACE_ID_VAL_MASK; in cs_etm__map_trace_ids_metadata()
3240 trace_chan_id = (u8)(metadata[i][CS_ETMV4_TRCTRACEIDR]); in cs_etm__map_trace_ids_metadata()
3246 err = cs_etm__map_trace_id_v0(etm, trace_chan_id, metadata[i]); in cs_etm__map_trace_ids_metadata()
3273 /* Use metadata to fill in trace parameters for trace decoder */ in cs_etm__create_queue_decoders()
3351 u64 **metadata = NULL; in cs_etm__process_auxtrace_info_full() local
3356 metadata = zalloc(sizeof(*metadata) * num_cpu); in cs_etm__process_auxtrace_info_full()
3357 if (!metadata) in cs_etm__process_auxtrace_info_full()
3364 * The metadata is stored in the auxtrace_info section and encodes in cs_etm__process_auxtrace_info_full()
3371 metadata[j] = in cs_etm__process_auxtrace_info_full()
3376 metadata[j] = in cs_etm__process_auxtrace_info_full()
3381 metadata[j] = cs_etm__create_meta_blk(ptr, &i, CS_ETE_PRIV_MAX, -1); in cs_etm__process_auxtrace_info_full()
3389 if (!metadata[j]) { in cs_etm__process_auxtrace_info_full()
3394 if ((int) metadata[j][CS_ETM_CPU] > max_cpu) in cs_etm__process_auxtrace_info_full()
3395 max_cpu = metadata[j][CS_ETM_CPU]; in cs_etm__process_auxtrace_info_full()
3401 * global metadata, and each cpu's metadata respectively. in cs_etm__process_auxtrace_info_full()
3423 etm->pid_fmt = cs_etm__init_pid_fmt(metadata[0]); in cs_etm__process_auxtrace_info_full()
3448 etm->metadata = metadata; in cs_etm__process_auxtrace_info_full()
3464 etm->has_virtual_ts = cs_etm__has_virtual_ts(metadata, num_cpu); in cs_etm__process_auxtrace_info_full()
3503 * Map Trace ID values to CPU metadata. in cs_etm__process_auxtrace_info_full()
3505 * Trace metadata will always contain Trace ID values from the legacy algorithm in cs_etm__process_auxtrace_info_full()
3516 * the metadata and decoders are only created for each mapping received. in cs_etm__process_auxtrace_info_full()
3519 * then we map Trace ID values to CPU directly from the metadata and create decoders in cs_etm__process_auxtrace_info_full()
3523 /* Scan for AUX_OUTPUT_HW_ID records to map trace ID values to CPU metadata */ in cs_etm__process_auxtrace_info_full()
3531 /* if no HW ID found this is a file with metadata values only, map from metadata */ in cs_etm__process_auxtrace_info_full()
3533 err = cs_etm__map_trace_ids_metadata(etm, num_cpu, metadata); in cs_etm__process_auxtrace_info_full()
3551 /* No need to check @metadata[j], free(NULL) is supported */ in cs_etm__process_auxtrace_info_full()
3553 zfree(&metadata[j]); in cs_etm__process_auxtrace_info_full()
3554 zfree(&metadata); in cs_etm__process_auxtrace_info_full()