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

Side by Side Diff: base/debug/trace_event.h

Issue 10834192: trace event macro ambiguity fix when int64 is used on 64-bit build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This header is designed to give you trace_event macros without specifying 5 // This header is designed to give you trace_event macros without specifying
6 // how the events actually get collected and stored. If you need to expose trace 6 // how the events actually get collected and stored. If you need to expose trace
7 // event to some other universe, you can copy-and-paste this file, 7 // event to some other universe, you can copy-and-paste this file,
8 // implement the TRACE_EVENT_API macros, and do any other necessary fixup for 8 // implement the TRACE_EVENT_API macros, and do any other necessary fixup for
9 // the target platform. The end result is that multiple libraries can funnel 9 // the target platform. The end result is that multiple libraries can funnel
10 // events through to a shared trace event collector. 10 // events through to a shared trace event collector.
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 #define INTERNAL_DECLARE_SET_TRACE_VALUE_INT(actual_type, \ 707 #define INTERNAL_DECLARE_SET_TRACE_VALUE_INT(actual_type, \
708 value_type_id) \ 708 value_type_id) \
709 static inline void SetTraceValue(actual_type arg, \ 709 static inline void SetTraceValue(actual_type arg, \
710 unsigned char* type, \ 710 unsigned char* type, \
711 unsigned long long* value) { \ 711 unsigned long long* value) { \
712 *type = value_type_id; \ 712 *type = value_type_id; \
713 *value = static_cast<unsigned long long>(arg); \ 713 *value = static_cast<unsigned long long>(arg); \
714 } 714 }
715 715
716 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned long long, TRACE_VALUE_TYPE_UINT) 716 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned long long, TRACE_VALUE_TYPE_UINT)
717 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned long, TRACE_VALUE_TYPE_UINT)
717 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned int, TRACE_VALUE_TYPE_UINT) 718 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned int, TRACE_VALUE_TYPE_UINT)
718 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned short, TRACE_VALUE_TYPE_UINT) 719 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned short, TRACE_VALUE_TYPE_UINT)
719 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned char, TRACE_VALUE_TYPE_UINT) 720 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned char, TRACE_VALUE_TYPE_UINT)
720 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(long long, TRACE_VALUE_TYPE_INT) 721 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(long long, TRACE_VALUE_TYPE_INT)
722 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(long, TRACE_VALUE_TYPE_INT)
721 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(int, TRACE_VALUE_TYPE_INT) 723 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(int, TRACE_VALUE_TYPE_INT)
722 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(short, TRACE_VALUE_TYPE_INT) 724 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(short, TRACE_VALUE_TYPE_INT)
723 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(signed char, TRACE_VALUE_TYPE_INT) 725 INTERNAL_DECLARE_SET_TRACE_VALUE_INT(signed char, TRACE_VALUE_TYPE_INT)
724 INTERNAL_DECLARE_SET_TRACE_VALUE(bool, as_bool, TRACE_VALUE_TYPE_BOOL) 726 INTERNAL_DECLARE_SET_TRACE_VALUE(bool, as_bool, TRACE_VALUE_TYPE_BOOL)
725 INTERNAL_DECLARE_SET_TRACE_VALUE(double, as_double, TRACE_VALUE_TYPE_DOUBLE) 727 INTERNAL_DECLARE_SET_TRACE_VALUE(double, as_double, TRACE_VALUE_TYPE_DOUBLE)
726 INTERNAL_DECLARE_SET_TRACE_VALUE(const void*, as_pointer, 728 INTERNAL_DECLARE_SET_TRACE_VALUE(const void*, as_pointer,
727 TRACE_VALUE_TYPE_POINTER) 729 TRACE_VALUE_TYPE_POINTER)
728 INTERNAL_DECLARE_SET_TRACE_VALUE(const char*, as_string, 730 INTERNAL_DECLARE_SET_TRACE_VALUE(const char*, as_string,
729 TRACE_VALUE_TYPE_STRING) 731 TRACE_VALUE_TYPE_STRING)
730 INTERNAL_DECLARE_SET_TRACE_VALUE(const TraceStringWithCopy&, as_string, 732 INTERNAL_DECLARE_SET_TRACE_VALUE(const TraceStringWithCopy&, as_string,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 const char* name; 864 const char* name;
863 int threshold_begin_id; 865 int threshold_begin_id;
864 }; 866 };
865 Data* p_data_; 867 Data* p_data_;
866 Data data_; 868 Data data_;
867 }; 869 };
868 870
869 } // namespace trace_event_internal 871 } // namespace trace_event_internal
870 872
871 #endif // BASE_DEBUG_TRACE_EVENT_H_ 873 #endif // BASE_DEBUG_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698