{"action":"created","comment":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments/173052085","pull_request_review_id":102175554,"id":173052085,"diff_hunk":"@@ -193,20 +193,29 @@ class DeviceTracerImpl : public DeviceTracer {\n \n   void AddCPURecords(const char *anno, uint64_t start_ns, uint64_t end_ns) {\n     std::lock_guard<std::mutex> l(trace_mu_);\n-    cpu_records_.push_back(\n-        CPURecord{anno, start_ns, end_ns,\n-                  std::hash<std::thread::id>{}(std::this_thread::get_id())});\n+    cpu_records_.push_back(CPURecord{anno, start_ns, end_ns, 0});\n   }\n \n   void AddMemRecords(const std::string &name, uint64_t start_ns,\n                      uint64_t end_ns, uint32_t device_id, uint32_t stream_id,\n                      uint32_t correlation_id, uint64_t bytes) {\n+    // 0 means timestamp information could not be collected for the kernel.\n+    if (start_ns == 0 || end_ns == 0) {\n+      LOG(WARNING) << name << \" cannot be traced\";\n+      return;\n+    }\n+    std::lock_guard<std::mutex> l(trace_mu_);\n     mem_records_.push_back(MemRecord{name, start_ns, end_ns, device_id,\n                                      stream_id, correlation_id, bytes});\n   }\n \n   void AddKernelRecords(uint64_t start, uint64_t end, uint32_t device_id,\n                         uint32_t stream_id, uint32_t correlation_id) {\n+    // 0 means timestamp information could not be collected for the kernel.\n+    if (start == 0 || end == 0) {\n+      LOG(WARNING) << correlation_id << \" cannot be traced\";","path":"paddle/fluid/platform/device_tracer.cc","position":null,"original_position":27,"commit_id":"30e556d675fa958783af6a5e31fa78616dc20c77","original_commit_id":"eb4684531307f1f1278a1e0869c8ebaf8ced4dc0","user":{"login":"jacquesqiao","id":3048612,"avatar_url":"https://avatars0.githubusercontent.com/u/3048612?v=4","gravatar_id":"","url":"https://api.github.com/users/jacquesqiao","html_url":"https://github.com/jacquesqiao","followers_url":"https://api.github.com/users/jacquesqiao/followers","following_url":"https://api.github.com/users/jacquesqiao/following{/other_user}","gists_url":"https://api.github.com/users/jacquesqiao/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquesqiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquesqiao/subscriptions","organizations_url":"https://api.github.com/users/jacquesqiao/orgs","repos_url":"https://api.github.com/users/jacquesqiao/repos","events_url":"https://api.github.com/users/jacquesqiao/events{/privacy}","received_events_url":"https://api.github.com/users/jacquesqiao/received_events","type":"User","site_admin":false},"body":"please use \r\n```cpp\r\nVLOG(level) << ...;\r\n```","created_at":"2018-03-08T03:07:04Z","updated_at":"2018-03-08T03:10:10Z","html_url":"https://github.com/PaddlePaddle/Paddle/pull/8775#discussion_r173052085","pull_request_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/8775","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments/173052085"},"html":{"href":"https://github.com/PaddlePaddle/Paddle/pull/8775#discussion_r173052085"},"pull_request":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/8775"}}},"pull_request":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/8775","id":173070368,"html_url":"https://github.com/PaddlePaddle/Paddle/pull/8775","diff_url":"https://github.com/PaddlePaddle/Paddle/pull/8775.diff","patch_url":"https://github.com/PaddlePaddle/Paddle/pull/8775.patch","issue_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/8775","number":8775,"state":"open","locked":false,"title":"Improve the timeline profiler","user":{"login":"panyx0718","id":2887803,"avatar_url":"https://avatars0.githubusercontent.com/u/2887803?v=4","gravatar_id":"","url":"https://api.github.com/users/panyx0718","html_url":"https://github.com/panyx0718","followers_url":"https://api.github.com/users/panyx0718/followers","following_url":"https://api.github.com/users/panyx0718/following{/other_user}","gists_url":"https://api.github.com/users/panyx0718/gists{/gist_id}","starred_url":"https://api.github.com/users/panyx0718/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panyx0718/subscriptions","organizations_url":"https://api.github.com/users/panyx0718/orgs","repos_url":"https://api.github.com/users/panyx0718/repos","events_url":"https://api.github.com/users/panyx0718/events{/privacy}","received_events_url":"https://api.github.com/users/panyx0718/received_events","type":"User","site_admin":false},"body":"Use binary instead of text format\r\nAvoid kernels that cannot be traced.","created_at":"2018-03-06T06:38:51Z","updated_at":"2018-03-08T03:11:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ebddb6c969f3327a2ed71f5ace0b79c3681a45b0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"qingqing01","id":7845005,"avatar_url":"https://avatars0.githubusercontent.com/u/7845005?v=4","gravatar_id":"","url":"https://api.github.com/users/qingqing01","html_url":"https://github.com/qingqing01","followers_url":"https://api.github.com/users/qingqing01/followers","following_url":"https://api.github.com/users/qingqing01/following{/other_user}","gists_url":"https://api.github.com/users/qingqing01/gists{/gist_id}","starred_url":"https://api.github.com/users/qingqing01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qingqing01/subscriptions","organizations_url":"https://api.github.com/users/qingqing01/orgs","repos_url":"https://api.github.com/users/qingqing01/repos","events_url":"https://api.github.com/users/qingqing01/events{/privacy}","received_events_url":"https://api.github.com/users/qingqing01/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/8775/commits","review_comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/8775/comments","review_comment_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/8775/comments","statuses_url":"https://api.github.com/repos/PaddlePaddle/Paddle/statuses/30e556d675fa958783af6a5e31fa78616dc20c77","head":{"label":"panyx0718:test2","ref":"test2","sha":"30e556d675fa958783af6a5e31fa78616dc20c77","user":{"login":"panyx0718","id":2887803,"avatar_url":"https://avatars0.githubusercontent.com/u/2887803?v=4","gravatar_id":"","url":"https://api.github.com/users/panyx0718","html_url":"https://github.com/panyx0718","followers_url":"https://api.github.com/users/panyx0718/followers","following_url":"https://api.github.com/users/panyx0718/following{/other_user}","gists_url":"https://api.github.com/users/panyx0718/gists{/gist_id}","starred_url":"https://api.github.com/users/panyx0718/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panyx0718/subscriptions","organizations_url":"https://api.github.com/users/panyx0718/orgs","repos_url":"https://api.github.com/users/panyx0718/repos","events_url":"https://api.github.com/users/panyx0718/events{/privacy}","received_events_url":"https://api.github.com/users/panyx0718/received_events","type":"User","site_admin":false},"repo":{"id":114556630,"name":"Paddle","full_name":"panyx0718/Paddle","owner":{"login":"panyx0718","id":2887803,"avatar_url":"https://avatars0.githubusercontent.com/u/2887803?v=4","gravatar_id":"","url":"https://api.github.com/users/panyx0718","html_url":"https://github.com/panyx0718","followers_url":"https://api.github.com/users/panyx0718/followers","following_url":"https://api.github.com/users/panyx0718/following{/other_user}","gists_url":"https://api.github.com/users/panyx0718/gists{/gist_id}","starred_url":"https://api.github.com/users/panyx0718/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panyx0718/subscriptions","organizations_url":"https://api.github.com/users/panyx0718/orgs","repos_url":"https://api.github.com/users/panyx0718/repos","events_url":"https://api.github.com/users/panyx0718/events{/privacy}","received_events_url":"https://api.github.com/users/panyx0718/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/panyx0718/Paddle","description":"PArallel Distributed Deep LEarning","fork":true,"url":"https://api.github.com/repos/panyx0718/Paddle","forks_url":"https://api.github.com/repos/panyx0718/Paddle/forks","keys_url":"https://api.github.com/repos/panyx0718/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/panyx0718/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/panyx0718/Paddle/teams","hooks_url":"https://api.github.com/repos/panyx0718/Paddle/hooks","issue_events_url":"https://api.github.com/repos/panyx0718/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/panyx0718/Paddle/events","assignees_url":"https://api.github.com/repos/panyx0718/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/panyx0718/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/panyx0718/Paddle/tags","blobs_url":"https://api.github.com/repos/panyx0718/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/panyx0718/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/panyx0718/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/panyx0718/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/panyx0718/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/panyx0718/Paddle/languages","stargazers_url":"https://api.github.com/repos/panyx0718/Paddle/stargazers","contributors_url":"https://api.github.com/repos/panyx0718/Paddle/contributors","subscribers_url":"https://api.github.com/repos/panyx0718/Paddle/subscribers","subscription_url":"https://api.github.com/repos/panyx0718/Paddle/subscription","commits_url":"https://api.github.com/repos/panyx0718/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/panyx0718/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/panyx0718/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/panyx0718/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/panyx0718/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/panyx0718/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/panyx0718/Paddle/merges","archive_url":"https://api.github.com/repos/panyx0718/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/panyx0718/Paddle/downloads","issues_url":"https://api.github.com/repos/panyx0718/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/panyx0718/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/panyx0718/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/panyx0718/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/panyx0718/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/panyx0718/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/panyx0718/Paddle/deployments","created_at":"2017-12-17T17:48:04Z","updated_at":"2017-12-17T17:48:11Z","pushed_at":"2018-03-08T03:10:09Z","git_url":"git://github.com/panyx0718/Paddle.git","ssh_url":"git@github.com:panyx0718/Paddle.git","clone_url":"https://github.com/panyx0718/Paddle.git","svn_url":"https://github.com/panyx0718/Paddle","homepage":"http://www.paddlepaddle.org/","size":81504,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"PaddlePaddle:develop","ref":"develop","sha":"ea4e6c7af78adecc009b847379f6df5db224ed45","user":{"login":"PaddlePaddle","id":23534030,"avatar_url":"https://avatars3.githubusercontent.com/u/23534030?v=4","gravatar_id":"","url":"https://api.github.com/users/PaddlePaddle","html_url":"https://github.com/PaddlePaddle","followers_url":"https://api.github.com/users/PaddlePaddle/followers","following_url":"https://api.github.com/users/PaddlePaddle/following{/other_user}","gists_url":"https://api.github.com/users/PaddlePaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/PaddlePaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaddlePaddle/subscriptions","organizations_url":"https://api.github.com/users/PaddlePaddle/orgs","repos_url":"https://api.github.com/users/PaddlePaddle/repos","events_url":"https://api.github.com/users/PaddlePaddle/events{/privacy}","received_events_url":"https://api.github.com/users/PaddlePaddle/received_events","type":"Organization","site_admin":false},"repo":{"id":65711522,"name":"Paddle","full_name":"PaddlePaddle/Paddle","owner":{"login":"PaddlePaddle","id":23534030,"avatar_url":"https://avatars3.githubusercontent.com/u/23534030?v=4","gravatar_id":"","url":"https://api.github.com/users/PaddlePaddle","html_url":"https://github.com/PaddlePaddle","followers_url":"https://api.github.com/users/PaddlePaddle/followers","following_url":"https://api.github.com/users/PaddlePaddle/following{/other_user}","gists_url":"https://api.github.com/users/PaddlePaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/PaddlePaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaddlePaddle/subscriptions","organizations_url":"https://api.github.com/users/PaddlePaddle/orgs","repos_url":"https://api.github.com/users/PaddlePaddle/repos","events_url":"https://api.github.com/users/PaddlePaddle/events{/privacy}","received_events_url":"https://api.github.com/users/PaddlePaddle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PaddlePaddle/Paddle","description":"PArallel Distributed Deep LEarning","fork":false,"url":"https://api.github.com/repos/PaddlePaddle/Paddle","forks_url":"https://api.github.com/repos/PaddlePaddle/Paddle/forks","keys_url":"https://api.github.com/repos/PaddlePaddle/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PaddlePaddle/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PaddlePaddle/Paddle/teams","hooks_url":"https://api.github.com/repos/PaddlePaddle/Paddle/hooks","issue_events_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/PaddlePaddle/Paddle/events","assignees_url":"https://api.github.com/repos/PaddlePaddle/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/PaddlePaddle/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/PaddlePaddle/Paddle/tags","blobs_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PaddlePaddle/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/PaddlePaddle/Paddle/languages","stargazers_url":"https://api.github.com/repos/PaddlePaddle/Paddle/stargazers","contributors_url":"https://api.github.com/repos/PaddlePaddle/Paddle/contributors","subscribers_url":"https://api.github.com/repos/PaddlePaddle/Paddle/subscribers","subscription_url":"https://api.github.com/repos/PaddlePaddle/Paddle/subscription","commits_url":"https://api.github.com/repos/PaddlePaddle/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/PaddlePaddle/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/PaddlePaddle/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PaddlePaddle/Paddle/merges","archive_url":"https://api.github.com/repos/PaddlePaddle/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PaddlePaddle/Paddle/downloads","issues_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/PaddlePaddle/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/PaddlePaddle/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PaddlePaddle/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/PaddlePaddle/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/deployments","created_at":"2016-08-15T06:59:08Z","updated_at":"2018-03-08T02:52:10Z","pushed_at":"2018-03-08T03:22:42Z","git_url":"git://github.com/PaddlePaddle/Paddle.git","ssh_url":"git@github.com:PaddlePaddle/Paddle.git","clone_url":"https://github.com/PaddlePaddle/Paddle.git","svn_url":"https://github.com/PaddlePaddle/Paddle","homepage":"http://www.paddlepaddle.org/","size":95420,"stargazers_count":6516,"watchers_count":6516,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1717,"mirror_url":null,"archived":false,"open_issues_count":1236,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1717,"open_issues":1236,"watchers":6516,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/8775"},"html":{"href":"https://github.com/PaddlePaddle/Paddle/pull/8775"},"issue":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/8775"},"comments":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/8775/comments"},"review_comments":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/8775/comments"},"review_comment":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/8775/commits"},"statuses":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/statuses/30e556d675fa958783af6a5e31fa78616dc20c77"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jacquesqiao"}}