lib/trace_parser: method for retrieving tsc offset
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I11fc341b4353c01cd933d6692cf97de3a3744a84 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9432 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
4ba770720a
commit
6727cc382b
@ -92,6 +92,16 @@ void spdk_trace_parser_cleanup(struct spdk_trace_parser *parser);
|
||||
*/
|
||||
const struct spdk_trace_flags *spdk_trace_parser_get_flags(const struct spdk_trace_parser *parser);
|
||||
|
||||
/**
|
||||
* Return the highest tsc out of first entries across all speicifed cores. This value can be used
|
||||
* to select entries from the subset of time we have the data from all reactors.
|
||||
*
|
||||
* \param parser Parser object to be used.
|
||||
*
|
||||
* \return Offset in tsc.
|
||||
*/
|
||||
uint64_t spdk_trace_parser_get_tsc_offset(const struct spdk_trace_parser *parser);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -5,6 +5,7 @@
|
||||
spdk_trace_parser_init;
|
||||
spdk_trace_parser_cleanup;
|
||||
spdk_trace_parser_get_flags;
|
||||
spdk_trace_parser_get_tsc_offset;
|
||||
|
||||
local: *;
|
||||
};
|
||||
|
@ -67,6 +67,7 @@ struct spdk_trace_parser {
|
||||
spdk_trace_parser(const spdk_trace_parser &) = delete;
|
||||
spdk_trace_parser &operator=(const spdk_trace_parser &) = delete;
|
||||
const spdk_trace_flags *flags() const { return &_histories->flags; }
|
||||
uint64_t tsc_offset() const { return _tsc_offset; }
|
||||
private:
|
||||
void populate_events(spdk_trace_history *history, int num_entries);
|
||||
bool init(const spdk_trace_parser_opts *opts);
|
||||
@ -264,3 +265,9 @@ spdk_trace_parser_get_flags(const struct spdk_trace_parser *parser)
|
||||
{
|
||||
return parser->flags();
|
||||
}
|
||||
|
||||
uint64_t
|
||||
spdk_trace_parser_get_tsc_offset(const struct spdk_trace_parser *parser)
|
||||
{
|
||||
return parser->tsc_offset();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user