diff options
author | Yong Tang <yong.tang.github@outlook.com> | 2018-06-21 22:05:47 -0700 |
---|---|---|
committer | Gunhan Gulsoy <gunan@google.com> | 2018-06-21 22:05:46 -0700 |
commit | d932155363d6ded97dda38ce799168d27566978b (patch) | |
tree | 3221394d7a0a3c266106289e179f1d77966c2f47 /tensorflow/core/profiler | |
parent | b302b73c4d0fbca4fcc015ab86040e21dd697bd4 (diff) |
Update jsoncpp to 1.8.4 (#20182)
* Update jsoncpp to 1.8.4
This fix updates the jsoncpp to 1.8.4 to address the issue
raised in 20170. The jsoncpp used in tf was old and may contain
security issues.
This fix fixes 20170.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add JSON_HAS_INT64 define to jsoncpp build
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix data type conversion issue for jsoncpp.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix build by include "version.h"
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'tensorflow/core/profiler')
-rw-r--r-- | tensorflow/core/profiler/internal/tfprof_timeline.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tensorflow/core/profiler/internal/tfprof_timeline.cc b/tensorflow/core/profiler/internal/tfprof_timeline.cc index b0dd8ce5e0..979b437914 100644 --- a/tensorflow/core/profiler/internal/tfprof_timeline.cc +++ b/tensorflow/core/profiler/internal/tfprof_timeline.cc @@ -47,9 +47,9 @@ Json::Value ChromeTraceFormatter::CreateEvent(const string& ph, event["ph"] = Json::Value(ph); event["cat"] = Json::Value(category); event["name"] = Json::Value(name); - event["pid"] = Json::Value(pid); - event["tid"] = Json::Value(tid); - event["ts"] = Json::Value(ts); + event["pid"] = Json::Int64(pid); + event["tid"] = Json::Int64(tid); + event["ts"] = Json::Int64(ts); return event; } @@ -57,7 +57,7 @@ void ChromeTraceFormatter::EmitPID(const string& name, int64 pid) { Json::Value event(Json::objectValue); event["name"] = Json::Value("process_name"); event["ph"] = Json::Value("M"); - event["pid"] = Json::Value(pid); + event["pid"] = Json::Int64(pid); Json::Value args(Json::objectValue); args["name"] = Json::Value(name); event["args"] = args; @@ -68,7 +68,7 @@ void ChromeTraceFormatter::EmitRegion(int64 ts, int64 duration, int64 pid, int64 tid, const string& category, const string& name, Json::Value args) { Json::Value event = CreateEvent("X", category, name, pid, tid, ts); - event["dur"] = Json::Value(duration); + event["dur"] = Json::Int64(duration); event["args"] = std::move(args); metadata_.push_back(event); } @@ -76,14 +76,14 @@ void ChromeTraceFormatter::EmitRegion(int64 ts, int64 duration, int64 pid, void ChromeTraceFormatter::EmitFlowStart(const string& name, int64 ts, int64 pid, int64 tid, int64 flow_id) { Json::Value event = CreateEvent("s", "DataFlow", name, pid, tid, ts); - event["id"] = flow_id; + event["id"] = Json::Int64(flow_id); events_.push_back(event); } void ChromeTraceFormatter::EmitFlowEnd(const string& name, int64 ts, int64 pid, int64 tid, int64 flow_id) { Json::Value event = CreateEvent("t", "DataFlow", name, pid, tid, ts); - event["id"] = flow_id; + event["id"] = Json::Int64(flow_id); events_.push_back(event); } @@ -93,7 +93,7 @@ void ChromeTraceFormatter::EmitCounter( const std::map<int64, std::vector<string>>& tensor_mem) { Json::Value event = CreateEvent("C", category, "Allocated Bytes", pid, 0, ts); Json::Value args(Json::objectValue); - args["Allocator Bytes in Use"] = Json::Value(bytes); + args["Allocator Bytes in Use"] = Json::Int64(bytes); event["args"] = args; events_.push_back(event); |