diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-08-22 12:09:20 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-22 12:12:38 -0700 |
commit | 36e475ce4d0a3565a81329641e2a95152eb9ebc6 (patch) | |
tree | 37011a00288bc7a30d7ed0eadb6775e50318de61 /tensorflow/core/profiler | |
parent | 8f2f9eb49813568b6a7b6a1fa7480e961f7b8c9a (diff) |
Replaced calls to tensorflow::StringPiece::ToString with string conversions.
That is, instances of sp.ToString() are replaced with string(sp).
This will allow tensorflow::StringPiece::ToString to be removed, which is necessary before it can be replaced with absl::string_view.
PiperOrigin-RevId: 209806694
Diffstat (limited to 'tensorflow/core/profiler')
-rw-r--r-- | tensorflow/core/profiler/internal/tfprof_code.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/profiler/internal/tfprof_code.cc b/tensorflow/core/profiler/internal/tfprof_code.cc index 2c4f52e3ad..744e1e95de 100644 --- a/tensorflow/core/profiler/internal/tfprof_code.cc +++ b/tensorflow/core/profiler/internal/tfprof_code.cc @@ -37,7 +37,7 @@ const char* const kGradientSuffix = " (gradient)"; // Convert to Trace proto into a short readable string. string GetTraceString(const CallStack::Trace& trace) { - string ntrace = io::Basename(trace.file()).ToString(); + string ntrace(io::Basename(trace.file())); ntrace += strings::StrCat(":", trace.lineno()); if (trace.function().length() < 20) { ntrace += ":" + trace.function(); @@ -113,7 +113,7 @@ class FunctionTable { // function index should start from 1. func_pb->set_id(function_table_.size()); - string file_base = io::Basename(file_path).ToString(); + string file_base(io::Basename(file_path)); file_base = file_base.substr(0, file_base.find_last_of(".")); func_pb->set_name( string_table_->GetIndex(strings::StrCat(file_base, ":", func_name))); |