[Openmp-commits] [PATCH] D21309: Fix for large overhead in OpenMP runtime with itt notifications on region/barrier name composing
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 14 12:34:17 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272698: Fix large overhead with itt notifications on region/barrier name composing (authored by jlpeyton).
Changed prior to commit:
http://reviews.llvm.org/D21309?vs=60601&id=60724#toc
Repository:
rL LLVM
http://reviews.llvm.org/D21309
Files:
openmp/trunk/runtime/src/kmp_itt.inl
Index: openmp/trunk/runtime/src/kmp_itt.inl
===================================================================
--- openmp/trunk/runtime/src/kmp_itt.inl
+++ openmp/trunk/runtime/src/kmp_itt.inl
@@ -348,17 +348,31 @@
}
__itt_string_handle * string_handle = __itt_string_handle_create( "omp_metadata_loop");
- kmp_str_loc_t str_loc = __kmp_str_loc_init( loc->psource, 1 );
+
+ // Parse line and column from psource string: ";file;func;line;col;;"
+ char * s_line;
+ char * s_col;
+ KMP_DEBUG_ASSERT(loc->psource);
+#ifdef __cplusplus
+ s_line = strchr((char*)loc->psource, ';');
+#else
+ s_line = strchr(loc->psource, ';');
+#endif
+ KMP_DEBUG_ASSERT(s_line);
+ s_line = strchr(s_line + 1, ';'); // 2-nd semicolon
+ KMP_DEBUG_ASSERT(s_line);
+ s_line = strchr(s_line + 1, ';'); // 3-rd semicolon
+ KMP_DEBUG_ASSERT(s_line);
+ s_col = strchr(s_line + 1, ';'); // 4-th semicolon
+ KMP_DEBUG_ASSERT(s_col);
kmp_uint64 loop_data[ 5 ];
- loop_data[ 0 ] = str_loc.line;
- loop_data[ 1 ] = str_loc.col;
+ loop_data[ 0 ] = atoi(s_line + 1); // read line
+ loop_data[ 1 ] = atoi(s_col + 1); // read column
loop_data[ 2 ] = sched_type;
loop_data[ 3 ] = iterations;
loop_data[ 4 ] = chunk;
- __kmp_str_loc_free( &str_loc );
-
__itt_metadata_add(metadata_domain, __itt_null, string_handle, __itt_metadata_u64, 5, loop_data);
#endif
} // __kmp_itt_metadata_loop
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21309.60724.patch
Type: text/x-patch
Size: 1455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160614/b5d1d841/attachment-0001.bin>
More information about the Openmp-commits
mailing list