OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 // Log file open mode is platform-dependent due to line ends issues. | 178 // Log file open mode is platform-dependent due to line ends issues. |
179 static const char* LogFileOpenMode; | 179 static const char* LogFileOpenMode; |
180 | 180 |
181 // Print output to console. This is mostly used for debugging output. | 181 // Print output to console. This is mostly used for debugging output. |
182 // On platforms that has standard terminal output, the output | 182 // On platforms that has standard terminal output, the output |
183 // should go to stdout. | 183 // should go to stdout. |
184 static void Print(const char* format, ...); | 184 static void Print(const char* format, ...); |
185 static void VPrint(const char* format, va_list args); | 185 static void VPrint(const char* format, va_list args); |
186 | 186 |
| 187 // Print output to a file. This is mostly used for debugging output. |
| 188 static void FPrint(FILE* out, const char* format, ...); |
| 189 static void VFPrint(FILE* out, const char* format, va_list args); |
| 190 |
187 // Print error output to console. This is mostly used for error message | 191 // Print error output to console. This is mostly used for error message |
188 // output. On platforms that has standard terminal output, the output | 192 // output. On platforms that has standard terminal output, the output |
189 // should go to stderr. | 193 // should go to stderr. |
190 static void PrintError(const char* format, ...); | 194 static void PrintError(const char* format, ...); |
191 static void VPrintError(const char* format, va_list args); | 195 static void VPrintError(const char* format, va_list args); |
192 | 196 |
193 // Allocate/Free memory used by JS heap. Pages are readable/writable, but | 197 // Allocate/Free memory used by JS heap. Pages are readable/writable, but |
194 // they are not guaranteed to be executable unless 'executable' is true. | 198 // they are not guaranteed to be executable unless 'executable' is true. |
195 // Returns the address of allocated memory, or NULL if failed. | 199 // Returns the address of allocated memory, or NULL if failed. |
196 static void* Allocate(const size_t requested, | 200 static void* Allocate(const size_t requested, |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 PlatformData* data_; // Platform specific data. | 611 PlatformData* data_; // Platform specific data. |
608 int samples_taken_; // Counts stack samples taken. | 612 int samples_taken_; // Counts stack samples taken. |
609 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 613 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
610 }; | 614 }; |
611 | 615 |
612 #endif // ENABLE_LOGGING_AND_PROFILING | 616 #endif // ENABLE_LOGGING_AND_PROFILING |
613 | 617 |
614 } } // namespace v8::internal | 618 } } // namespace v8::internal |
615 | 619 |
616 #endif // V8_PLATFORM_H_ | 620 #endif // V8_PLATFORM_H_ |
OLD | NEW |