Chromium Code Reviews| Index: src/assembler.h |
| diff --git a/src/assembler.h b/src/assembler.h |
| index 971b95022781a288e799cb216dded820f5f18bc3..7bd117cdc92d6fb27280f3e6d0169bec13168f24 100644 |
| --- a/src/assembler.h |
| +++ b/src/assembler.h |
| @@ -382,6 +382,22 @@ class RelocIterator: public Malloced { |
| }; |
| +// A stack-allocated code region logs a name for the code generated |
| +// while the region is in effect. This information is used by the |
| +// profiler to categorize ticks within generated code. |
| +class CodeRegion BASE_EMBEDDED { |
| + public: |
| + inline CodeRegion(Assembler* assm, const char *name) : assm_(assm) { |
|
Mads Ager (chromium)
2008/12/19 12:44:01
Nit: I think we have used asm as the abbreviation
Christian Plesner Hansen
2008/12/19 13:22:06
I doubt is: 'asm' is a keyword.
|
| + LOG(BeginCodeRegionEvent(this, assm, name)); |
| + } |
| + inline ~CodeRegion() { |
| + LOG(EndCodeRegionEvent(this, assm_)); |
| + } |
| + private: |
| + Assembler* assm_; |
| +}; |
| + |
| + |
| //------------------------------------------------------------------------------ |
| // External function |