OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Use trace_analyzer::Query and trace_analyzer::TraceAnalyzer to search for | 5 // Use trace_analyzer::Query and trace_analyzer::TraceAnalyzer to search for |
6 // specific trace events that were generated by the trace_event.h API. | 6 // specific trace events that were generated by the trace_event.h API. |
7 // | 7 // |
8 // Basic procedure: | 8 // Basic procedure: |
9 // - Get trace events JSON string from base::debug::TraceLog. | 9 // - Get trace events JSON string from base::debug::TraceLog. |
10 // - Create TraceAnalyzer with JSON string. | 10 // - Create TraceAnalyzer with JSON string. |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 scoped_refptr<QueryNode> left_; | 354 scoped_refptr<QueryNode> left_; |
355 scoped_refptr<QueryNode> right_; | 355 scoped_refptr<QueryNode> right_; |
356 TraceEventMember member_; | 356 TraceEventMember member_; |
357 double number_; | 357 double number_; |
358 std::string string_; | 358 std::string string_; |
359 bool is_pattern_; | 359 bool is_pattern_; |
360 }; | 360 }; |
361 | 361 |
362 // Implementation detail: | 362 // Implementation detail: |
363 // QueryNode allows Query to store a ref-counted query tree. | 363 // QueryNode allows Query to store a ref-counted query tree. |
364 class BASE_EXPORT QueryNode : public base::RefCounted<QueryNode> { | 364 class QueryNode : public base::RefCounted<QueryNode> { |
365 public: | 365 public: |
366 explicit QueryNode(const Query& query); | 366 explicit QueryNode(const Query& query); |
367 const Query& query() const { return query_; } | 367 const Query& query() const { return query_; } |
368 | 368 |
369 private: | 369 private: |
370 friend class base::RefCounted<QueryNode>; | 370 friend class base::RefCounted<QueryNode>; |
371 ~QueryNode(); | 371 ~QueryNode(); |
372 | 372 |
373 Query query_; | 373 Query query_; |
374 }; | 374 }; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 std::map<TraceEvent::ProcessThreadID, std::string> thread_names_; | 439 std::map<TraceEvent::ProcessThreadID, std::string> thread_names_; |
440 std::vector<TraceEvent> raw_events_; | 440 std::vector<TraceEvent> raw_events_; |
441 bool allow_assocation_changes_; | 441 bool allow_assocation_changes_; |
442 | 442 |
443 DISALLOW_COPY_AND_ASSIGN(TraceAnalyzer); | 443 DISALLOW_COPY_AND_ASSIGN(TraceAnalyzer); |
444 }; | 444 }; |
445 | 445 |
446 } // namespace trace_analyzer | 446 } // namespace trace_analyzer |
447 | 447 |
448 #endif // BASE_TEST_TRACE_EVENT_ANALYZER_H_ | 448 #endif // BASE_TEST_TRACE_EVENT_ANALYZER_H_ |
OLD | NEW |