summaryrefslogtreecommitdiff
path: root/lib/profile
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2015-11-18 22:09:41 +0000
committerXinliang David Li <davidxl@google.com>2015-11-18 22:09:41 +0000
commit8401d5ce678e45939c090c02f6545085f4a4fb7f (patch)
tree867410bfdb8d1003a7053aefca2d3d57131339a7 /lib/profile
parent22b4585282aa3c7a6de855bc424116203abe8ead (diff)
Fix format in comments.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile')
-rw-r--r--lib/profile/InstrProfiling.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/profile/InstrProfiling.c b/lib/profile/InstrProfiling.c
index cc8637042..0ea03c23d 100644
--- a/lib/profile/InstrProfiling.c
+++ b/lib/profile/InstrProfiling.c
@@ -29,7 +29,8 @@ __attribute__((visibility("hidden"))) uint64_t __llvm_profile_get_magic(void) {
}
/* Return the number of bytes needed to add to SizeInBytes to make it
- the result a multiple of 8. */
+ * the result a multiple of 8.
+ */
__attribute__((visibility("hidden"))) uint8_t
__llvm_profile_get_num_padding_bytes(uint64_t SizeInBytes) {
return 7 & (sizeof(uint64_t) - SizeInBytes % sizeof(uint64_t));
@@ -70,13 +71,14 @@ __attribute__((visibility("hidden"))) void __llvm_profile_reset_counters(void) {
}
}
-// Total number of value profile data in bytes.
+/* Total number of value profile data in bytes. */
static uint64_t TotalValueDataSize = 0;
/* Allocate an array that holds the pointers to the linked lists of
- value profile counter nodes. The number of element of the array
- is the total number of value profile sites instrumented. Returns
- 0 if allocation fails. */
+ * value profile counter nodes. The number of element of the array
+ * is the total number of value profile sites instrumented. Returns
+ * 0 if allocation fails.
+ */
static int allocateValueProfileCounters(__llvm_profile_data *Data) {
uint64_t NumVSites = 0;
@@ -92,10 +94,11 @@ static int allocateValueProfileCounters(__llvm_profile_data *Data) {
free(Mem);
return 0;
}
- /* In the raw format, there will be an value count array preceding
- the value profile data. The element type of the array is uint8_t,
- and there is one element in array per value site. The element
- stores the number of values profiled for the corresponding site. */
+ /* In the raw format, there will be an value count array preceding
+ * the value profile data. The element type of the array is uint8_t,
+ * and there is one element in array per value site. The element
+ * stores the number of values profiled for the corresponding site.
+ */
uint8_t Padding = __llvm_profile_get_num_padding_bytes(NumVSites);
__sync_fetch_and_add(&TotalValueDataSize, NumVSites + Padding);
return 1;