projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
359fd83
)
[aot] Allow the redirection of aot profile output to an already opened fd using outfi...
author
Zoltan Varga
<vargaz@gmail.com>
Mon, 23 Jan 2017 10:48:54 +0000
(
05:48
-0500)
committer
Zoltan Varga
<vargaz@gmail.com>
Mon, 23 Jan 2017 10:48:54 +0000
(
05:48
-0500)
mono/profiler/mono-profiler-aot.c
patch
|
blob
|
history
diff --git
a/mono/profiler/mono-profiler-aot.c
b/mono/profiler/mono-profiler-aot.c
index 05ed0758ed2cfff00dea1280523e4e3abc7495c9..59f8aeea2a0a838e89d3cf8ca5422d65db89c60c 100644
(file)
--- a/
mono/profiler/mono-profiler-aot.c
+++ b/
mono/profiler/mono-profiler-aot.c
@@
-368,7
+368,12
@@
prof_shutdown (MonoProfiler *prof)
printf ("Creating output file: %s\n", prof->outfile_name);
- outfile = fopen (prof->outfile_name, "w+");
+ if (prof->outfile_name [0] == '#') {
+ int fd = strtol (prof->outfile_name + 1, NULL, 10);
+ outfile = fdopen (fd, "a");
+ } else {
+ outfile = fopen (prof->outfile_name, "w+");
+ }
if (!outfile) {
fprintf (stderr, "Unable to create output file '%s': %s.\n", prof->outfile_name, strerror (errno));
return;