|
|
|
@ -14,6 +14,7 @@
|
|
|
|
|
|
|
|
|
|
import argparse
|
|
|
|
|
import json
|
|
|
|
|
import six
|
|
|
|
|
import sys
|
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
|
@ -124,7 +125,7 @@ class Timeline(object):
|
|
|
|
|
return cur_pid
|
|
|
|
|
|
|
|
|
|
def _allocate_pids(self):
|
|
|
|
|
for k, profile_pb in self._profile_dict.iteritems():
|
|
|
|
|
for k, profile_pb in six.iteritems(self._profile_dict):
|
|
|
|
|
for event in profile_pb.events:
|
|
|
|
|
if event.type == profiler_pb2.Event.CPU:
|
|
|
|
|
if (k, event.device_id, "CPU") not in self._devices:
|
|
|
|
@ -140,7 +141,7 @@ class Timeline(object):
|
|
|
|
|
(k, event.device_id), pid)
|
|
|
|
|
|
|
|
|
|
def _allocate_events(self):
|
|
|
|
|
for k, profile_pb in self._profile_dict.iteritems():
|
|
|
|
|
for k, profile_pb in six.iteritems(self._profile_dict):
|
|
|
|
|
for event in profile_pb.events:
|
|
|
|
|
if event.type == profiler_pb2.Event.CPU:
|
|
|
|
|
type = "CPU"
|
|
|
|
|