| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // invalidate already cached translated code. This leads to random | 65 // invalidate already cached translated code. This leads to random |
| 66 // instability when code patches or moves are sometimes unnoticed. One | 66 // instability when code patches or moves are sometimes unnoticed. One |
| 67 // solution is to run valgrind with --smc-check=all, but this comes at a big | 67 // solution is to run valgrind with --smc-check=all, but this comes at a big |
| 68 // performance cost. We can notify valgrind to invalidate its cache. | 68 // performance cost. We can notify valgrind to invalidate its cache. |
| 69 #ifdef VALGRIND_DISCARD_TRANSLATIONS | 69 #ifdef VALGRIND_DISCARD_TRANSLATIONS |
| 70 unsigned res = VALGRIND_DISCARD_TRANSLATIONS(start, size); | 70 unsigned res = VALGRIND_DISCARD_TRANSLATIONS(start, size); |
| 71 USE(res); | 71 USE(res); |
| 72 #endif | 72 #endif |
| 73 } | 73 } |
| 74 | 74 |
| 75 | |
| 76 void CPU::DebugBreak() { | |
| 77 #ifdef _MSC_VER | |
| 78 // To avoid Visual Studio runtime support the following code can be used | |
| 79 // instead | |
| 80 // __asm { int 3 } | |
| 81 __debugbreak(); | |
| 82 #else | |
| 83 asm("int $3"); | |
| 84 #endif | |
| 85 } | |
| 86 | |
| 87 } } // namespace v8::internal | 75 } } // namespace v8::internal |
| 88 | 76 |
| 89 #endif // V8_TARGET_ARCH_X64 | 77 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |