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

Side by Side Diff: runtime/include/dart_tools_api.h

Issue 2994223002: Restore "Add current rss and embedder name to Observatory" (Closed)
Patch Set: Created 3 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
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | runtime/observatory/lib/models.dart » ('j') | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_INCLUDE_DART_TOOLS_API_H_ 5 #ifndef RUNTIME_INCLUDE_DART_TOOLS_API_H_
6 #define RUNTIME_INCLUDE_DART_TOOLS_API_H_ 6 #define RUNTIME_INCLUDE_DART_TOOLS_API_H_
7 7
8 #include "dart_api.h" 8 #include "dart_api.h"
9 9
10 /** \mainpage Dart Tools Embedding API Reference 10 /** \mainpage Dart Tools Embedding API Reference
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 * \param user_data The user data passed to the callback. 758 * \param user_data The user data passed to the callback.
759 * 759 *
760 * NOTE: If multiple callbacks with the same name are registered, only 760 * NOTE: If multiple callbacks with the same name are registered, only
761 * the last callback registered will be remembered. 761 * the last callback registered will be remembered.
762 */ 762 */
763 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 763 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
764 const char* method, 764 const char* method,
765 Dart_ServiceRequestCallback callback, 765 Dart_ServiceRequestCallback callback,
766 void* user_data); 766 void* user_data);
767 767
768 /**
769 * Embedder information which can be requested by the VM for internal or
770 * reporting purposes.
771 *
772 * The pointers in this structure are not going to be cached or freed by the VM.
773 */
774
775 #define DART_EMBEDDER_INFORMATION_CURRENT_VERSION (0x00000001)
776
777 typedef struct {
778 int32_t version;
779 const char* name; // [optional] The name of the embedder
780 uintptr_t current_rss; // [optional] the current RSS of the embedder
781 uintptr_t max_rss; // [optional] the maximum RSS of the embedder
782 } Dart_EmbedderInformation;
783
784 /**
785 * Callback provided by the embedder that is used by the vm to request
786 * information.
787 *
788 * \return Returns a pointer to a Dart_EmbedderInformation structure.
789 * The embedder keeps the ownership of the structure and any field in it.
790 * The embedder must ensure that the structure will remain valid until the
791 * next invokation of the callback.
792 */
793 typedef void (*Dart_EmbedderInformationCallback)(
794 Dart_EmbedderInformation* info);
795
796 /**
797 * Register a Dart_ServiceRequestCallback to be called to handle
798 * requests for the named rpc. The callback will be invoked without a
799 * current isolate.
800 *
801 * \param method The name of the command that this callback is responsible for.
802 * \param callback The callback to invoke.
803 * \param user_data The user data passed to the callback.
804 *
805 * NOTE: If multiple callbacks with the same name are registered, only
806 * the last callback registered will be remembered.
807 */
808 DART_EXPORT void Dart_SetEmbedderInformationCallback(
809 Dart_EmbedderInformationCallback callback);
810
768 /* 811 /*
769 * ======== 812 * ========
770 * Event Streams 813 * Event Streams
771 * ======== 814 * ========
772 */ 815 */
773 816
774 /** 817 /**
775 * A callback invoked when the VM service gets a request to listen to 818 * A callback invoked when the VM service gets a request to listen to
776 * some stream. 819 * some stream.
777 * 820 *
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 * \param start_recording See Dart_EmbedderTimelineStartRecording. 1063 * \param start_recording See Dart_EmbedderTimelineStartRecording.
1021 * \param stop_recording See Dart_EmbedderTimelineStopRecording. 1064 * \param stop_recording See Dart_EmbedderTimelineStopRecording.
1022 * 1065 *
1023 * NOTE: To avoid races, this should be called before Dart_Initialize. 1066 * NOTE: To avoid races, this should be called before Dart_Initialize.
1024 */ 1067 */
1025 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks( 1068 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks(
1026 Dart_EmbedderTimelineStartRecording start_recording, 1069 Dart_EmbedderTimelineStartRecording start_recording,
1027 Dart_EmbedderTimelineStopRecording stop_recording); 1070 Dart_EmbedderTimelineStopRecording stop_recording);
1028 1071
1029 #endif // RUNTIME_INCLUDE_DART_TOOLS_API_H_ 1072 #endif // RUNTIME_INCLUDE_DART_TOOLS_API_H_
OLDNEW
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | runtime/observatory/lib/models.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698