summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-05-13 18:26:26 +0000
committerXinliang David Li <davidxl@google.com>2016-05-13 18:26:26 +0000
commitd2006b722b9193efa23a990d60fd0eaddb92c70b (patch)
tree83bc96f96774d846de35e0e633159c569ae1d3c9 /test
parent84611c6a8dfbf9cdffe3d19fd9805f4abed15c6d (diff)
[profile] Eliminate dynamic memory allocation for buffered writer
With this change, dynamic memory allocation is only used for testing purpose. This change is one of the many steps to make instrument profiler dynamic allocation free. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269453 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/profile/instrprof-bufferio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/profile/instrprof-bufferio.c b/test/profile/instrprof-bufferio.c
index b0d5d37b8..558425486 100644
--- a/test/profile/instrprof-bufferio.c
+++ b/test/profile/instrprof-bufferio.c
@@ -11,7 +11,7 @@
#include <string.h>
typedef struct ProfBufferIO ProfBufferIO;
-ProfBufferIO *lprofCreateBufferIOInternal(FILE *File, uint32_t DefaultBufferSz);
+ProfBufferIO *lprofCreateBufferIOInternal(void *File, uint32_t BufferSz);
void lprofDeleteBufferIO(ProfBufferIO *BufferIO);
int lprofBufferIOWrite(ProfBufferIO *BufferIO, const char *Data, uint32_t Size);
@@ -44,7 +44,8 @@ int main(int argc, const char *argv[]) {
BufferIO = lprofCreateBufferIOInternal(File[J], IOBufferSize[J]);
- lprofBufferIOWrite(BufferIO, "Short Strings:\n", strlen("Short Strings:\n"));
+ lprofBufferIOWrite(BufferIO, "Short Strings:\n",
+ strlen("Short Strings:\n"));
for (I = 0; I < 1024; I++) {
lprofBufferIOWrite(BufferIO, SmallData, strlen(SmallData));
}