Files
sdk/runtime/bin/vmservice_impl.h
T
johnmccutchan@google.com 435c6ad7ac Reduce service isolate startup time from ~80ms to ~30ms
- Get access to dart:io internal signal listening function using API instead of mirrors.

- Service isolate can start with service deactivated.
- Load Observatory front end resources only when service activated.
- Do not execute Dart Service code until service is activated.
- Register live isolates when service is activated.

- Startup refactored to allow for future use of script snapshots.

R=asiva@google.com

Review URL: https://codereview.chromium.org//533073005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40124 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 22:38:33 +00:00

46 lines
1.4 KiB
C++

// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef BIN_VMSERVICE_IMPL_H_
#define BIN_VMSERVICE_IMPL_H_
#include "bin/vmservice.h"
#include "platform/globals.h"
namespace dart {
namespace bin {
class VmService {
public:
// Returns false if service could not be started.
static bool Start(const char *server_ip, intptr_t server_port);
// Error message if startup failed.
static const char* GetErrorMessage();
private:
static bool _Start(const char *server_ip, intptr_t server_port);
static Dart_Handle GetSource(const char* name);
static Dart_Handle LoadScript(const char* name);
static Dart_Handle LoadSource(Dart_Handle library, const char* name);
static Dart_Handle LoadResources(Dart_Handle library);
static Dart_Handle LoadResource(Dart_Handle library, const char* name,
const char* prefix);
static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library,
Dart_Handle url);
friend void TriggerResourceLoad(Dart_NativeArguments args);
static void ThreadMain(uword parameters);
static const char* error_msg_;
DISALLOW_ALLOCATION();
DISALLOW_IMPLICIT_CONSTRUCTORS(VmService);
};
} // namespace bin
} // namespace dart
#endif // BIN_VMSERVICE_IMPL_H_