Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
dart::PcDescriptors Class Reference

#include <object.h>

Inheritance diagram for dart::PcDescriptors:
dart::Object

Classes

class  Iterator
 

Public Member Functions

void Verify (const Function &function) const
 
void PrintToJSONObject (JSONObject *jsobj, bool ref) const
 
intptr_t Length () const
 
bool Equals (const PcDescriptors &other) const
 
void WriteToBuffer (BaseTextBuffer *buffer, uword base) const
 
- Public Member Functions inherited from dart::Object
virtual ~Object ()
 
ObjectPtr ptr () const
 
void operator= (ObjectPtr value)
 
bool IsCanonical () const
 
void SetCanonical () const
 
void ClearCanonical () const
 
bool IsImmutable () const
 
void SetImmutable () const
 
void ClearImmutable () const
 
intptr_t GetClassId () const
 
ClassPtr clazz () const
 
 CLASS_LIST_FOR_HANDLES (DEFINE_CLASS_TESTER)
 
bool IsNull () const
 
virtual const char * ToCString () const
 
void PrintJSON (JSONStream *stream, bool ref=true) const
 
virtual void PrintJSONImpl (JSONStream *stream, bool ref) const
 
void PrintImplementationFields (JSONStream *stream) const
 
virtual void PrintImplementationFieldsImpl (const JSONArray &jsarr_fields) const
 
virtual const char * JSONType () const
 
virtual StringPtr DictionaryName () const
 
bool IsNew () const
 
bool IsOld () const
 
bool InVMIsolateHeap () const
 
void Print () const
 

Static Public Member Functions

static intptr_t HeaderSize ()
 
static intptr_t UnroundedSize (PcDescriptorsPtr desc)
 
static intptr_t UnroundedSize (intptr_t len)
 
static intptr_t InstanceSize ()
 
static intptr_t InstanceSize (intptr_t len)
 
static PcDescriptorsPtr New (const void *delta_encoded_data, intptr_t size)
 
- Static Public Member Functions inherited from dart::Object
static ObjectPtr RawCast (ObjectPtr obj)
 
static constexpr bool ContainsCompressedPointers ()
 
static intptr_t tags_offset ()
 
static ObjectHandle ()
 
static ObjectHandle (Zone *zone)
 
static ObjectHandle (ObjectPtr ptr)
 
static ObjectHandle (Zone *zone, ObjectPtr ptr)
 
static ObjectZoneHandle ()
 
static ObjectZoneHandle (Zone *zone)
 
static ObjectZoneHandle (ObjectPtr ptr)
 
static ObjectZoneHandle (Zone *zone, ObjectPtr ptr)
 
static ObjectReadOnlyHandle ()
 
static ObjectPtr null ()
 
static void set_vm_isolate_snapshot_object_table (const Array &table)
 
static ClassPtr class_class ()
 
static ClassPtr dynamic_class ()
 
static ClassPtr void_class ()
 
static ClassPtr type_parameters_class ()
 
static ClassPtr type_arguments_class ()
 
static ClassPtr patch_class_class ()
 
static ClassPtr function_class ()
 
static ClassPtr closure_data_class ()
 
static ClassPtr ffi_trampoline_data_class ()
 
static ClassPtr field_class ()
 
static ClassPtr script_class ()
 
static ClassPtr library_class ()
 
static ClassPtr namespace_class ()
 
static ClassPtr kernel_program_info_class ()
 
static ClassPtr code_class ()
 
static ClassPtr instructions_class ()
 
static ClassPtr instructions_section_class ()
 
static ClassPtr instructions_table_class ()
 
static ClassPtr object_pool_class ()
 
static ClassPtr pc_descriptors_class ()
 
static ClassPtr code_source_map_class ()
 
static ClassPtr compressed_stackmaps_class ()
 
static ClassPtr var_descriptors_class ()
 
static ClassPtr exception_handlers_class ()
 
static ClassPtr context_class ()
 
static ClassPtr context_scope_class ()
 
static ClassPtr sentinel_class ()
 
static ClassPtr api_error_class ()
 
static ClassPtr language_error_class ()
 
static ClassPtr unhandled_exception_class ()
 
static ClassPtr unwind_error_class ()
 
static ClassPtr singletargetcache_class ()
 
static ClassPtr unlinkedcall_class ()
 
static ClassPtr monomorphicsmiablecall_class ()
 
static ClassPtr icdata_class ()
 
static ClassPtr megamorphic_cache_class ()
 
static ClassPtr subtypetestcache_class ()
 
static ClassPtr loadingunit_class ()
 
static ClassPtr weak_serialization_reference_class ()
 
static ClassPtr weak_array_class ()
 
static void InitNullAndBool (IsolateGroup *isolate_group)
 
static void Init (IsolateGroup *isolate_group)
 
static void InitVtables ()
 
static void FinishInit (IsolateGroup *isolate_group)
 
static void FinalizeVMIsolate (IsolateGroup *isolate_group)
 
static void FinalizeReadOnlyObject (ObjectPtr object)
 
static void Cleanup ()
 
static ErrorPtr Init (IsolateGroup *isolate_group, const uint8_t *kernel_buffer, intptr_t kernel_buffer_size)
 
static void MakeUnusedSpaceTraversable (const Object &obj, intptr_t original_size, intptr_t used_size)
 
static intptr_t InstanceSize ()
 
template<class FakeObject >
static void VerifyBuiltinVtable (intptr_t cid)
 
static void VerifyBuiltinVtables ()
 
static bool ShouldHaveImmutabilityBitSet (classid_t class_id)
 

Static Public Attributes

static constexpr intptr_t kBytesPerElement = 1
 
static constexpr intptr_t kMaxElements = kMaxInt32 / kBytesPerElement
 
- Static Public Attributes inherited from dart::Object
static constexpr intptr_t kHashBits = 30
 
static const ClassId kClassId = kObjectCid
 

Friends

class Class
 
class Object
 

Additional Inherited Members

- Public Types inherited from dart::Object
enum  NameVisibility { kInternalName = 0 , kScrubbedName , kUserVisibleName }
 
enum class  NameDisambiguation { kYes , kNo }
 
using UntaggedObjectType = UntaggedObject
 
using ObjectPtrType = ObjectPtr
 
- Protected Member Functions inherited from dart::Object
 Object ()
 
uword raw_value () const
 
void setPtr (ObjectPtr value, intptr_t default_cid)
 
void CheckHandle () const
 
cpp_vtable vtable () const
 
void set_vtable (cpp_vtable value)
 
bool Contains (uword addr) const
 
template<typename type , std::memory_order order = std::memory_order_relaxed>
type LoadPointer (type const *addr) const
 
template<typename type , std::memory_order order = std::memory_order_relaxed>
void StorePointer (type const *addr, type value) const
 
template<typename type , typename compressed_type , std::memory_order order = std::memory_order_relaxed>
void StoreCompressedPointer (compressed_type const *addr, type value) const
 
template<typename type >
void StorePointerUnaligned (type const *addr, type value, Thread *thread) const
 
void StoreSmi (SmiPtr const *addr, SmiPtr value) const
 
template<typename FieldType >
void StoreSimd128 (const FieldType *addr, simd128_value_t value) const
 
template<typename FieldType >
FieldType LoadNonPointer (const FieldType *addr) const
 
template<typename FieldType , std::memory_order order>
FieldType LoadNonPointer (const FieldType *addr) const
 
template<typename FieldType , typename ValueType >
void StoreNonPointer (const FieldType *addr, ValueType value) const
 
template<typename FieldType , typename ValueType , std::memory_order order>
void StoreNonPointer (const FieldType *addr, ValueType value) const
 
template<typename FieldType >
FieldType * UnsafeMutableNonPointer (const FieldType *addr) const
 
 CLASS_LIST (STORE_NON_POINTER_ILLEGAL_TYPE)
 
void UnimplementedMethod () const
 
void AddCommonObjectProperties (JSONObject *jsobj, const char *protocol_type, bool ref) const
 
- Static Protected Member Functions inherited from dart::Object
static DART_NOINLINE ObjectHandleImpl (Zone *zone, ObjectPtr ptr, intptr_t default_cid)
 
static DART_NOINLINE ObjectZoneHandleImpl (Zone *zone, ObjectPtr ptr, intptr_t default_cid)
 
static DART_NOINLINE ObjectReadOnlyHandleImpl (intptr_t cid)
 
static ObjectPtr Allocate (intptr_t cls_id, intptr_t size, Heap::Space space, bool compressed, uword ptr_field_start_offset, uword ptr_field_end_offset)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType Allocate (Heap::Space space)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType Allocate (Heap::Space space, intptr_t elements)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType AllocateVariant (intptr_t class_id, Heap::Space space)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType AllocateVariant (intptr_t class_id, Heap::Space space, intptr_t elements)
 
static constexpr intptr_t RoundedAllocationSize (intptr_t size)
 
static ObjectPtr Clone (const Object &orig, Heap::Space space, bool load_with_relaxed_atomics=false)
 
template<typename T >
static DART_FORCE_INLINE uword from_offset ()
 
template<typename T >
static DART_FORCE_INLINE uword to_offset (intptr_t length=0)
 
- Protected Attributes inherited from dart::Object
ObjectPtr ptr_
 

Detailed Description

Definition at line 6079 of file object.h.

Member Function Documentation

◆ Equals()

bool dart::PcDescriptors::Equals ( const PcDescriptors other) const
inline

Definition at line 6194 of file object.h.

6194 {
6195 if (Length() != other.Length()) {
6196 return false;
6197 }
6198 NoSafepointScope no_safepoint;
6199 return memcmp(untag()->data(), other.untag()->data(), Length()) == 0;
6200 }
intptr_t Length() const
Definition: object.cc:15779
raw_obj untag() -> num_entries()) VARIABLE_COMPRESSED_VISITOR(Array, Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(TypedData, TypedData::ElementSizeInBytes(raw_obj->GetClassId()) *Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(Record, RecordShape(raw_obj->untag() ->shape()).num_fields()) VARIABLE_NULL_VISITOR(CompressedStackMaps, CompressedStackMaps::PayloadSizeOf(raw_obj)) VARIABLE_NULL_VISITOR(OneByteString, Smi::Value(raw_obj->untag() ->length())) VARIABLE_NULL_VISITOR(TwoByteString, Smi::Value(raw_obj->untag() ->length())) intptr_t UntaggedField::VisitFieldPointers(FieldPtr raw_obj, ObjectPointerVisitor *visitor)
Definition: raw_object.cc:558
static int8_t data[kExtLength]

◆ HeaderSize()

static intptr_t dart::PcDescriptors::HeaderSize ( )
inlinestatic

Definition at line 6084 of file object.h.

6084{ return sizeof(UntaggedPcDescriptors); }

◆ InstanceSize() [1/2]

static intptr_t dart::PcDescriptors::InstanceSize ( )
inlinestatic

Definition at line 6089 of file object.h.

6089 {
6090 ASSERT_EQUAL(sizeof(UntaggedPcDescriptors),
6091 OFFSET_OF_RETURNED_VALUE(UntaggedPcDescriptors, data));
6092 return 0;
6093 }
#define ASSERT_EQUAL(expected, actual)
Definition: assert.h:309
#define OFFSET_OF_RETURNED_VALUE(type, accessor)
Definition: globals.h:143

◆ InstanceSize() [2/2]

static intptr_t dart::PcDescriptors::InstanceSize ( intptr_t  len)
inlinestatic

Definition at line 6094 of file object.h.

6094 {
6095 ASSERT(0 <= len && len <= kMaxElements);
6097 }
static constexpr intptr_t RoundedAllocationSize(intptr_t size)
Definition: object.h:758
static constexpr intptr_t kMaxElements
Definition: object.h:6082
static intptr_t UnroundedSize(PcDescriptorsPtr desc)
Definition: object.h:6085
#define ASSERT(E)

◆ Length()

intptr_t dart::PcDescriptors::Length ( ) const

Definition at line 15779 of file object.cc.

15779 {
15780 return untag()->length_;
15781}

◆ New()

PcDescriptorsPtr dart::PcDescriptors::New ( const void *  delta_encoded_data,
intptr_t  size 
)
static

Definition at line 15794 of file object.cc.

15795 {
15797 Thread* thread = Thread::Current();
15798 PcDescriptors& result = PcDescriptors::Handle(thread->zone());
15799 {
15800 auto raw = Object::Allocate<PcDescriptors>(Heap::kOld, size);
15801 NoSafepointScope no_safepoint;
15802 result = raw;
15803 result.SetLength(size);
15804 }
15805 result.CopyData(delta_encoded_data, size);
15806 return result.ptr();
15807}
@ kOld
Definition: heap.h:39
static ClassPtr pc_descriptors_class()
Definition: object.h:540
static ObjectPtr null()
Definition: object.h:433
static Object & Handle()
Definition: object.h:407
friend class Thread
Definition: object.h:1025
static Thread * Current()
Definition: thread.h:362
GAsyncResult * result
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

◆ PrintToJSONObject()

void dart::PcDescriptors::PrintToJSONObject ( JSONObject jsobj,
bool  ref 
) const

Definition at line 848 of file object_service.cc.

848 {
849 AddCommonObjectProperties(jsobj, "Object", ref);
850 // TODO(johnmccutchan): Generate a stable id. PcDescriptors hang off a Code
851 // object but do not have a back reference to generate an ID.
852 jsobj->AddServiceId(*this);
853 if (ref) {
854 return;
855 }
856 JSONArray members(jsobj, "members");
857 Iterator iter(*this, UntaggedPcDescriptors::kAnyKind);
858 while (iter.MoveNext()) {
859 JSONObject descriptor(&members);
860 descriptor.AddPropertyF("pcOffset", "%" Px "", iter.PcOffset());
861 descriptor.AddProperty("kind", KindAsStr(iter.Kind()));
862 descriptor.AddProperty("deoptId", iter.DeoptId());
863 // TODO(turnidge): Use AddLocation instead.
864 descriptor.AddProperty("tokenPos", iter.TokenPos());
865 descriptor.AddProperty("tryIndex", iter.TryIndex());
866 }
867}
void AddCommonObjectProperties(JSONObject *jsobj, const char *protocol_type, bool ref) const
#define Px
Definition: globals.h:410

◆ UnroundedSize() [1/2]

static intptr_t dart::PcDescriptors::UnroundedSize ( intptr_t  len)
inlinestatic

Definition at line 6088 of file object.h.

6088{ return HeaderSize() + len; }
static intptr_t HeaderSize()
Definition: object.h:6084

◆ UnroundedSize() [2/2]

static intptr_t dart::PcDescriptors::UnroundedSize ( PcDescriptorsPtr  desc)
inlinestatic

Definition at line 6085 of file object.h.

6085 {
6086 return UnroundedSize(desc->untag()->length_);
6087 }

◆ Verify()

void dart::PcDescriptors::Verify ( const Function function) const

Definition at line 15880 of file object.cc.

15880 {
15881#if defined(DEBUG)
15882 // Only check ids for unoptimized code that is optimizable.
15883 if (!function.IsOptimizable()) {
15884 return;
15885 }
15886 intptr_t max_deopt_id = 0;
15887 Iterator max_iter(
15888 *this, UntaggedPcDescriptors::kDeopt | UntaggedPcDescriptors::kIcCall);
15889 while (max_iter.MoveNext()) {
15890 if (max_iter.DeoptId() > max_deopt_id) {
15891 max_deopt_id = max_iter.DeoptId();
15892 }
15893 }
15894
15895 Zone* zone = Thread::Current()->zone();
15896 BitVector* deopt_ids = new (zone) BitVector(zone, max_deopt_id + 1);
15897 BitVector* iccall_ids = new (zone) BitVector(zone, max_deopt_id + 1);
15898 Iterator iter(*this,
15899 UntaggedPcDescriptors::kDeopt | UntaggedPcDescriptors::kIcCall);
15900 while (iter.MoveNext()) {
15901 // 'deopt_id' is set for kDeopt and kIcCall and must be unique for one kind.
15902 if (DeoptId::IsDeoptAfter(iter.DeoptId())) {
15903 // TODO(vegorov): some instructions contain multiple calls and have
15904 // multiple "after" targets recorded. Right now it is benign but might
15905 // lead to issues in the future. Fix that and enable verification.
15906 continue;
15907 }
15908 if (iter.Kind() == UntaggedPcDescriptors::kDeopt) {
15909 ASSERT(!deopt_ids->Contains(iter.DeoptId()));
15910 deopt_ids->Add(iter.DeoptId());
15911 } else {
15912 ASSERT(!iccall_ids->Contains(iter.DeoptId()));
15913 iccall_ids->Add(iter.DeoptId());
15914 }
15915 }
15916#endif // DEBUG
15917}
static bool IsDeoptAfter(intptr_t deopt_id)
Definition: deopt_id.h:40
Zone * zone() const
Definition: thread_state.h:37
Dart_NativeFunction function
Definition: fuchsia.cc:51

◆ WriteToBuffer()

void dart::PcDescriptors::WriteToBuffer ( BaseTextBuffer buffer,
uword  base 
) const

Definition at line 15848 of file object.cc.

15848 {
15849 // 4 bits per hex digit.
15850 const int addr_width = kBitsPerWord / 4;
15851 // "*" in a printf format specifier tells it to read the field width from
15852 // the printf argument list.
15853 buffer->Printf(
15854 "%-*s kind deopt-id tok-ix try-ix yield-idx\n",
15855 addr_width, "pc");
15856 Iterator iter(*this, UntaggedPcDescriptors::kAnyKind);
15857 while (iter.MoveNext()) {
15858 buffer->Printf("%#-*" Px " %-13s % 8" Pd " %-10s % 8" Pd " % 8" Pd
15859 "\n",
15860 addr_width, base + iter.PcOffset(), KindAsStr(iter.Kind()),
15861 iter.DeoptId(), iter.TokenPos().ToCString(), iter.TryIndex(),
15862 iter.YieldIndex());
15863 }
15864}
constexpr intptr_t kBitsPerWord
Definition: globals.h:514
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126
#define Pd
Definition: globals.h:408

Friends And Related Function Documentation

◆ Class

friend class Class
friend

Definition at line 6215 of file object.h.

◆ Object

friend class Object
friend

Definition at line 6216 of file object.h.

Member Data Documentation

◆ kBytesPerElement

constexpr intptr_t dart::PcDescriptors::kBytesPerElement = 1
staticconstexpr

Definition at line 6081 of file object.h.

◆ kMaxElements

constexpr intptr_t dart::PcDescriptors::kMaxElements = kMaxInt32 / kBytesPerElement
staticconstexpr

Definition at line 6082 of file object.h.


The documentation for this class was generated from the following files: