[PATCH] D62078: This change adds an API to allow setting the flag to indicate that the profile data has been dumped to the file.
Max Moroz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 13:00:13 PDT 2019
Dor1s updated this revision to Diff 200351.
Dor1s added a comment.
Herald added a subscriber: delcypher.
Getting ready to commit
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62078/new/
https://reviews.llvm.org/D62078
Files:
lib/profile/InstrProfiling.c
lib/profile/InstrProfiling.h
Index: lib/profile/InstrProfiling.h
===================================================================
--- lib/profile/InstrProfiling.h
+++ lib/profile/InstrProfiling.h
@@ -192,6 +192,14 @@
const __llvm_profile_data *End);
/*!
+ * \brief Set the flag that profile data has been dumped to the file.
+ * This is useful for users to disable dumping profile data to the file for
+ * certain processes in case the processes don't have permission to write to
+ * the disks, and trying to do so would result in side effects such as crashes.
+ */
+void __llvm_profile_set_dumped();
+
+/*!
* This variable is defined in InstrProfilingRuntime.cc as a hidden
* symbol. Its main purpose is to enable profile runtime user to
* bypass runtime initialization code -- if the client code explicitly
Index: lib/profile/InstrProfiling.c
===================================================================
--- lib/profile/InstrProfiling.c
+++ lib/profile/InstrProfiling.c
@@ -35,6 +35,10 @@
ProfileDumped = 1;
}
+COMPILER_RT_VISIBILITY void __llvm_profile_set_dumped() {
+ lprofSetProfileDumped();
+}
+
/* Return the number of bytes needed to add to SizeInBytes to make it
* the result a multiple of 8.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62078.200351.patch
Type: text/x-patch
Size: 1249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190520/53e901ea/attachment.bin>
More information about the llvm-commits
mailing list