GCC Code Coverage Report
Directory: ../ Exec Total Coverage
File: /home/iojs/build/workspace/node-test-commit-linux-coverage-daily/nodes/benchmark/out/../src/node_postmortem_metadata.cc Lines: 8 8 100.0 %
Date: 2019-09-24 22:36:24 Branches: 2 4 50.0 %

Line Branch Exec Source
1
#include "env.h"
2
#include "base_object-inl.h"
3
#include "handle_wrap.h"
4
#include "util-inl.h"
5
#include "req_wrap.h"
6
#include "v8abbr.h"
7
#include "node_context_data.h"
8
9
#define NODEDBG_SYMBOL(Name)  nodedbg_ ## Name
10
11
// nodedbg_offset_CLASS__MEMBER__TYPE: Describes the offset to a class member.
12
#define NODEDBG_OFFSET(Class, Member, Type) \
13
    NODEDBG_SYMBOL(offset_ ## Class ## __ ## Member ## __ ## Type)
14
15
// These are the constants describing Node internal structures. Every constant
16
// should use the format described above.  These constants are declared as
17
// global integers so that they'll be present in the generated node binary. They
18
// also need to be declared outside any namespace to avoid C++ name-mangling.
19
#define NODE_OFFSET_POSTMORTEM_METADATA(V)                                    \
20
  V(BaseObject, persistent_handle_, v8_Persistent_v8_Object,                  \
21
    BaseObject::persistent_handle_)                                           \
22
  V(Environment, handle_wrap_queue_, Environment_HandleWrapQueue,             \
23
    Environment::handle_wrap_queue_)                                          \
24
  V(Environment, req_wrap_queue_, Environment_ReqWrapQueue,                   \
25
    Environment::req_wrap_queue_)                                             \
26
  V(HandleWrap, handle_wrap_queue_, ListNode_HandleWrap,                      \
27
    HandleWrap::handle_wrap_queue_)                                           \
28
  V(Environment_HandleWrapQueue, head_, ListNode_HandleWrap,                  \
29
    Environment::HandleWrapQueue::head_)                                      \
30
  V(ListNode_HandleWrap, next_, uintptr_t, ListNode<HandleWrap>::next_)       \
31
  V(Environment_ReqWrapQueue, head_, ListNode_ReqWrapQueue,                   \
32
    Environment::ReqWrapQueue::head_)                                         \
33
  V(ListNode_ReqWrap, next_, uintptr_t, ListNode<ReqWrapBase>::next_)
34
35
extern "C" {
36
int nodedbg_const_ContextEmbedderIndex__kEnvironment__int;
37
uintptr_t nodedbg_offset_ExternalString__data__uintptr_t;
38
uintptr_t nodedbg_offset_ReqWrap__req_wrap_queue___ListNode_ReqWrapQueue;
39
40
#define V(Class, Member, Type, Accessor)                                      \
41
  NODE_EXTERN uintptr_t NODEDBG_OFFSET(Class, Member, Type);
42
  NODE_OFFSET_POSTMORTEM_METADATA(V)
43
#undef V
44
}
45
46
namespace node {
47
48
4956
int GenDebugSymbols() {
49
  nodedbg_const_ContextEmbedderIndex__kEnvironment__int =
50
4956
      ContextEmbedderIndex::kEnvironment;
51
52
4956
  nodedbg_offset_ExternalString__data__uintptr_t = NODE_OFF_EXTSTR_DATA;
53
  nodedbg_offset_ReqWrap__req_wrap_queue___ListNode_ReqWrapQueue =
54
      OffsetOf<ListNode<ReqWrapBase>, ReqWrap<uv_req_t>>(
55
4956
          &ReqWrap<uv_req_t>::req_wrap_queue_);
56
57
  #define V(Class, Member, Type, Accessor)                                    \
58
    NODEDBG_OFFSET(Class, Member, Type) = OffsetOf(&Accessor);
59
4956
    NODE_OFFSET_POSTMORTEM_METADATA(V)
60
  #undef V
61
62
4956
  return 1;
63
}
64
65
4956
const int debug_symbols_generated = GenDebugSymbols();
66
67

14868
}  // namespace node