2323
2424namespace libkineto {
2525
26- using namespace KINETO_NAMESPACE ;
2726struct CpuTraceBuffer ;
2827
2928#ifdef _MSC_VER
@@ -52,10 +51,10 @@ struct DeviceInfo {
5251 const std::string& name,
5352 const std::string& label)
5453 : id(id), sortIndex(sortIndex), name(name), label(label) {}
55- int64_t id; // process id
56- int64_t sortIndex; // position in trace view
57- const std::string name; // process name
58- const std::string label; // device label
54+ int64_t id; // process id
55+ int64_t sortIndex; // position in trace view
56+ const std::string name; // process name
57+ const std::string label; // device label
5958};
6059
6160/* ResourceInfo:
@@ -68,21 +67,20 @@ struct ResourceInfo {
6867 int64_t sortIndex,
6968 const std::string& name)
7069 : id(id), sortIndex(sortIndex), deviceId(deviceId), name(name) {}
71- int64_t id; // resource id
72- int64_t sortIndex; // position in trace view
73- int64_t deviceId; // id of device which owns this resource (specified in DeviceInfo.id)
70+ int64_t id; // resource id
71+ int64_t sortIndex; // position in trace view
72+ int64_t deviceId; // id of device which owns this resource (specified in
73+ // DeviceInfo.id)
7474 const std::string name; // resource name
7575};
7676
77- using getLinkedActivityCallback =
78- std::function<const ITraceActivity*(int32_t )>;
77+ using getLinkedActivityCallback = std::function<const ITraceActivity*(int32_t )>;
7978
8079/* IActivityProfilerSession:
8180 * an opaque object that can be used by a high level profiler to
8281 * start/stop and return trace events.
8382 */
8483class IActivityProfilerSession {
85-
8684 public:
8785 virtual ~IActivityProfilerSession () {}
8886
@@ -102,9 +100,11 @@ class IActivityProfilerSession {
102100 // processes trace activities using logger
103101 virtual void processTrace (ActivityLogger& logger) = 0;
104102
105- virtual void processTrace (ActivityLogger& logger,
106- getLinkedActivityCallback /* getLinkedActivity*/ ,
107- int64_t /* startTime*/ , int64_t /* endTime*/ ) {
103+ virtual void processTrace (
104+ ActivityLogger& logger,
105+ getLinkedActivityCallback /* getLinkedActivity*/ ,
106+ int64_t /* startTime*/ ,
107+ int64_t /* endTime*/ ) {
108108 processTrace (logger);
109109 }
110110
@@ -126,21 +126,22 @@ class IActivityProfilerSession {
126126 virtual void pushUserCorrelationId (uint64_t /* id*/ ) {}
127127 virtual void popUserCorrelationId () {}
128128
129+ virtual std::string getDeviceProperties () {
130+ return " " ;
131+ }
132+
129133 protected:
130134 TraceStatus status_ = TraceStatus::READY;
131135};
132136
133-
134137/* Activity Profiler Plugins:
135138 * These allow other frameworks to integrate into Kineto's primariy
136139 * activity profiler. While the primary activity profiler handles
137140 * timing the trace collections and correlating events the plugins
138141 * can become source of new trace activity types.
139142 */
140143class IActivityProfiler {
141-
142144 public:
143-
144145 virtual ~IActivityProfiler () {}
145146
146147 // name of profiler
0 commit comments