Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: src/oprofile-agent.cc

Issue 125181: Added utility scripts for running oprofile (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/oprofile/annotate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Disable code moving by GC. 45 // Disable code moving by GC.
46 FLAG_always_compact = false; 46 FLAG_always_compact = false;
47 FLAG_never_compact = true; 47 FLAG_never_compact = true;
48 48
49 handle_ = op_open_agent(); 49 handle_ = op_open_agent();
50 return (handle_ != NULL); 50 return (handle_ != NULL);
51 } else { 51 } else {
52 return true; 52 return true;
53 } 53 }
54 #else 54 #else
55 if (FLAG_oprofile) {
56 OS::Print("Warning: --oprofile specified but binary compiled without "
57 "oprofile support.\n");
58 }
55 return true; 59 return true;
56 #endif 60 #endif
57 } 61 }
58 62
59 63
60 void OProfileAgent::TearDown() { 64 void OProfileAgent::TearDown() {
61 #ifdef ENABLE_OPROFILE_AGENT 65 #ifdef ENABLE_OPROFILE_AGENT
62 if (handle_ != NULL) { 66 if (handle_ != NULL) {
63 op_close_agent(handle_); 67 op_close_agent(handle_);
64 } 68 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (v8::internal::OS::SNPrintF(buf, "%s %s:%d", 107 if (v8::internal::OS::SNPrintF(buf, "%s %s:%d",
104 func_name, *source_str, line_num) != -1) { 108 func_name, *source_str, line_num) != -1) {
105 CreateNativeCodeRegion(buf.start(), ptr, size); 109 CreateNativeCodeRegion(buf.start(), ptr, size);
106 } else { 110 } else {
107 CreateNativeCodeRegion("<script/func name too long>", ptr, size); 111 CreateNativeCodeRegion("<script/func name too long>", ptr, size);
108 } 112 }
109 } 113 }
110 #endif 114 #endif
111 } 115 }
112 } } 116 } }
OLDNEW
« no previous file with comments | « no previous file | tools/oprofile/annotate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698