scripts/trace: add owner/object type to tracepoint definition

These fields aren't needed by the JSON provider, as the trace entries in
this format already has the owner and object fields filled, but it'll be
needed for the provider using the trace library.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I9db974793193fe59bfffc8dd3b975d5343036be9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Konrad Sztyber 2021-09-02 11:21:05 +02:00 committed by Keith Lucas
parent 5655f98534
commit d41fc9fc48

View File

@ -148,6 +148,8 @@ class Tracepoint:
name: str
id: int
new_object: bool
object_type: int
owner_type: int
args: List[TracepointArgument]
@ -193,7 +195,8 @@ class JsonProvider(TraceProvider):
tpoint_id = tpoint['id']
self._tpoints[tpoint_id] = Tracepoint(
name=tpoint['name'], id=tpoint_id,
new_object=tpoint['new_object'],
new_object=tpoint['new_object'], object_type=OBJECT_NONE,
owner_type=OWNER_NONE,
args=[TracepointArgument(name=a['name'],
argtype=a['type'])
for a in tpoint.get('args', [])])