diff --git a/tensorflow/core/kernels/data/BUILD b/tensorflow/core/kernels/data/BUILD index 448a5def807..e5adb2dfba2 100644 --- a/tensorflow/core/kernels/data/BUILD +++ b/tensorflow/core/kernels/data/BUILD @@ -463,7 +463,6 @@ tf_kernel_library( "//tensorflow/core:session_options", "//tensorflow/core/kernels:ops_util", "//tensorflow/core/profiler/lib:traceme", - "//tensorflow/core/profiler/lib:traceme_encode", "@com_google_absl//absl/memory", ], ) diff --git a/tensorflow/core/kernels/data/iterator_ops.cc b/tensorflow/core/kernels/data/iterator_ops.cc index f79d8e7d8c7..f3d2382db1f 100644 --- a/tensorflow/core/kernels/data/iterator_ops.cc +++ b/tensorflow/core/kernels/data/iterator_ops.cc @@ -47,12 +47,10 @@ limitations under the License. #include "tensorflow/core/lib/strings/stringprintf.h" #include "tensorflow/core/platform/casts.h" #include "tensorflow/core/platform/env.h" -#include "tensorflow/core/platform/mem.h" #include "tensorflow/core/platform/mutex.h" #include "tensorflow/core/platform/refcount.h" #include "tensorflow/core/platform/resource.h" #include "tensorflow/core/profiler/lib/traceme.h" -#include "tensorflow/core/profiler/lib/traceme_encode.h" #include "tensorflow/core/public/session_options.h" namespace tensorflow { @@ -967,18 +965,9 @@ void RecordElementSize(const std::vector element, Status IteratorGetNextOp::DoCompute(OpKernelContext* ctx) { profiler::TraceMe traceme( [&] { - int64 mem_bw = port::GetMemoryInfo().bw_used; - - if (mem_bw != INT64_MAX) { - return profiler::TraceMeEncode( - "IteratorGetNextOp::DoCompute", - {{"id", ctx->step_id()}, - {"iter_num", ctx->frame_iter().iter_id}, - {"mem_bw_used_megabytes_per_sec", mem_bw}}); - } - return profiler::TraceMeEncode( - "IteratorGetNextOp::DoCompute", - {{"id", ctx->step_id()}, {"iter_num", ctx->frame_iter().iter_id}}); + return strings::StrCat( + "IteratorGetNextOp::DoCompute#id=", ctx->step_id(), + ",iter_num=", ctx->frame_iter().iter_id, "#"); }, profiler::kInfo); tensorflow::ResourceTagger tag(kTFDataResourceTag, diff --git a/tensorflow/core/platform/default/port.cc b/tensorflow/core/platform/default/port.cc index 6e82c67be99..e25ed074844 100644 --- a/tensorflow/core/platform/default/port.cc +++ b/tensorflow/core/platform/default/port.cc @@ -357,7 +357,7 @@ double NominalCPUFrequency() { } MemoryInfo GetMemoryInfo() { - MemoryInfo mem_info = {INT64_MAX, INT64_MAX, INT64_MAX}; + MemoryInfo mem_info = {INT64_MAX, INT64_MAX}; #if defined(__linux__) && !defined(__ANDROID__) struct sysinfo info; int err = sysinfo(&info); diff --git a/tensorflow/core/platform/mem.h b/tensorflow/core/platform/mem.h index e01d4953c62..27ad3574182 100644 --- a/tensorflow/core/platform/mem.h +++ b/tensorflow/core/platform/mem.h @@ -62,7 +62,6 @@ std::size_t MallocExtension_GetAllocatedSize(const void* p); struct MemoryInfo { int64 total = 0; int64 free = 0; - int64 bw_used = 0; // memory bandwidth used across all CPU (in MBs/second) }; // Retrieves the host memory information. If any of the fields in the returned diff --git a/tensorflow/core/platform/windows/port.cc b/tensorflow/core/platform/windows/port.cc index 256f525a38d..16b5a328256 100644 --- a/tensorflow/core/platform/windows/port.cc +++ b/tensorflow/core/platform/windows/port.cc @@ -192,7 +192,7 @@ double NominalCPUFrequency() { } MemoryInfo GetMemoryInfo() { - MemoryInfo mem_info = {INT64_MAX, INT64_MAX, INT64_MAX}; + MemoryInfo mem_info = {INT64_MAX, INT64_MAX}; MEMORYSTATUSEX statex; statex.dwLength = sizeof(statex); if (GlobalMemoryStatusEx(&statex)) {