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

Side by Side Diff: content/renderer/greenweb_latency_tracking.h

Issue 1835303002: Implementation of the GreenWeb language extensions. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change GreenWeb-related CSS property names such that they apply in the desired order at runtime. Created 4 years, 8 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
« no previous file with comments | « cc/output/latency_info_swap_promise.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef GREENWEB_LATENCY_TRACKING_H_
2 #define GREENWEB_LATENCY_TRACKING_H_
3
4 #include <map>
5
6 #include "base/time/time.h"
7
8 #undef EBS_DEBUG_TRACE_EVENT
9 #define EBS_DEBUG_SCHED
10 #undef EBS_DEBUG_IPC
11 #define EBS_DEBUG_OS
12
13 #ifdef EBS_DEBUG_SCHED
14 #define dbg_sched_fprintf(...) do{ fprintf( __VA_ARGS__ ); } while( false )
15 #define dbg_sched_cout(x) do{ std::cout << x << std::endl; } while( false )
16 #else
17 #define dbg_sched_fprintf(...) do{ } while ( false )
18 #define dbg_sched_cout(x) do{ } while( false )
19 #endif
20
21 #ifdef EBS_DEBUG_IPC
22 #define dbg_ipc_fprintf(...) do{ fprintf( __VA_ARGS__ ); } while( false )
23 #define dbg_ipc_cout(x) do{ std::cout << x << std::endl; } while( false )
24 #else
25 #define dbg_ipc_fprintf(...) do{ } while ( false )
26 #define dbg_ipc_cout(x) do{ } while( false )
27 #endif
28
29 struct GreenWebLatencyComponent {
30 base::TimeTicks callback_start;
31 // main thread time = callback + layout or callback,
32 // depending on if HandleInputEventMainCommit is executed
33 int64 latency;
34 int64 dom_node;
35
36 std::map<int64, int64> FreqStatStartMap;
37
38 GreenWebLatencyComponent() : dom_node(0) {}
39 };
40
41 struct DOMLatencyMapComponent {
42 int64 latency;
43 std::map<int64, int64> FreqStatMap;
44 };
45
46 typedef std::map<int64, std::map<uint32, int64>> NodeFreqLatencyMap;
47 typedef std::map<uint32, int64> FreqLatencyMap;
48
49 // Map from LatencyInfo trace_id_ to GreenWebLatencyComponent
50 extern std::map<int64, GreenWebLatencyComponent> InputLatencyMap;
51
52 // Map from DOM Node address to latency (GreenWebLatencyComponent.latency)
53 extern std::map<int64, DOMLatencyMapComponent> DOMLatencyMap;
54
55 // trace_id_ of LatencyInfo
56 extern int64 InputLatencyID;
57
58 // QoS Type
59 extern char g_qos_type;
60
61 // QoS target
62 extern int g_qos_target;
63
64 // EBS enabled
65 extern bool g_ebs_enabled;
66
67 namespace content {
68 extern void process_freq_stat(std::map<int64, int64>*, std::map<int64, int64>* );
69 }
70
71 #endif // GREENWEB_LATENCY_TRACKING_H_
OLDNEW
« no previous file with comments | « cc/output/latency_info_swap_promise.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698