/usr/include/thunderbird/nsIMemoryReporter.h is in thunderbird-dev 1:52.8.0-1~deb8u1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 | /*
* DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIMemoryReporter.idl
*/
#ifndef __gen_nsIMemoryReporter_h__
#define __gen_nsIMemoryReporter_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
#include <stdio.h>
class mozIDOMWindowProxy; /* forward declaration */
class nsIRunnable; /* forward declaration */
class nsISimpleEnumerator; /* forward declaration */
/* starting interface: nsIMemoryReporterCallback */
#define NS_IMEMORYREPORTERCALLBACK_IID_STR "62ef0e1c-dbd6-11e3-aa75-3c970e9f4238"
#define NS_IMEMORYREPORTERCALLBACK_IID \
{0x62ef0e1c, 0xdbd6, 0x11e3, \
{ 0xaa, 0x75, 0x3c, 0x97, 0x0e, 0x9f, 0x42, 0x38 }}
class NS_NO_VTABLE nsIMemoryReporterCallback : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMEMORYREPORTERCALLBACK_IID)
/* void callback (in ACString process, in AUTF8String path, in int32_t kind, in int32_t units, in int64_t amount, in AUTF8String description, in nsISupports data); */
NS_IMETHOD Callback(const nsACString & process, const nsACString & path, int32_t kind, int32_t units, int64_t amount, const nsACString & description, nsISupports *data) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIMemoryReporterCallback, NS_IMEMORYREPORTERCALLBACK_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMEMORYREPORTERCALLBACK \
NS_IMETHOD Callback(const nsACString & process, const nsACString & path, int32_t kind, int32_t units, int64_t amount, const nsACString & description, nsISupports *data) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIMEMORYREPORTERCALLBACK \
NS_METHOD Callback(const nsACString & process, const nsACString & path, int32_t kind, int32_t units, int64_t amount, const nsACString & description, nsISupports *data);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMEMORYREPORTERCALLBACK(_to) \
NS_IMETHOD Callback(const nsACString & process, const nsACString & path, int32_t kind, int32_t units, int64_t amount, const nsACString & description, nsISupports *data) override { return _to Callback(process, path, kind, units, amount, description, data); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMEMORYREPORTERCALLBACK(_to) \
NS_IMETHOD Callback(const nsACString & process, const nsACString & path, int32_t kind, int32_t units, int64_t amount, const nsACString & description, nsISupports *data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Callback(process, path, kind, units, amount, description, data); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsMemoryReporterCallback : public nsIMemoryReporterCallback
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIMEMORYREPORTERCALLBACK
nsMemoryReporterCallback();
private:
~nsMemoryReporterCallback();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsMemoryReporterCallback, nsIMemoryReporterCallback)
nsMemoryReporterCallback::nsMemoryReporterCallback()
{
/* member initializers and constructor code */
}
nsMemoryReporterCallback::~nsMemoryReporterCallback()
{
/* destructor code */
}
/* void callback (in ACString process, in AUTF8String path, in int32_t kind, in int32_t units, in int64_t amount, in AUTF8String description, in nsISupports data); */
NS_IMETHODIMP nsMemoryReporterCallback::Callback(const nsACString & process, const nsACString & path, int32_t kind, int32_t units, int64_t amount, const nsACString & description, nsISupports *data)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIMemoryReporter */
#define NS_IMEMORYREPORTER_IID_STR "92a36db1-46bd-4fe6-988e-47db47236d8b"
#define NS_IMEMORYREPORTER_IID \
{0x92a36db1, 0x46bd, 0x4fe6, \
{ 0x98, 0x8e, 0x47, 0xdb, 0x47, 0x23, 0x6d, 0x8b }}
class NS_NO_VTABLE nsIMemoryReporter : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMEMORYREPORTER_IID)
/* void collectReports (in nsIMemoryReporterCallback callback, in nsISupports data, in boolean anonymize); */
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *callback, nsISupports *data, bool anonymize) = 0;
enum {
KIND_NONHEAP = 0,
KIND_HEAP = 1,
KIND_OTHER = 2,
UNITS_BYTES = 0,
UNITS_COUNT = 1,
UNITS_COUNT_CUMULATIVE = 2,
UNITS_PERCENTAGE = 3
};
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIMemoryReporter, NS_IMEMORYREPORTER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMEMORYREPORTER \
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *callback, nsISupports *data, bool anonymize) override; \
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIMEMORYREPORTER \
NS_METHOD CollectReports(nsIMemoryReporterCallback *callback, nsISupports *data, bool anonymize); \
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMEMORYREPORTER(_to) \
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *callback, nsISupports *data, bool anonymize) override { return _to CollectReports(callback, data, anonymize); } \
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMEMORYREPORTER(_to) \
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *callback, nsISupports *data, bool anonymize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CollectReports(callback, data, anonymize); } \
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsMemoryReporter : public nsIMemoryReporter
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIMEMORYREPORTER
nsMemoryReporter();
private:
~nsMemoryReporter();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsMemoryReporter, nsIMemoryReporter)
nsMemoryReporter::nsMemoryReporter()
{
/* member initializers and constructor code */
}
nsMemoryReporter::~nsMemoryReporter()
{
/* destructor code */
}
/* void collectReports (in nsIMemoryReporterCallback callback, in nsISupports data, in boolean anonymize); */
NS_IMETHODIMP nsMemoryReporter::CollectReports(nsIMemoryReporterCallback *callback, nsISupports *data, bool anonymize)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIFinishReportingCallback */
#define NS_IFINISHREPORTINGCALLBACK_IID_STR "548b3909-c04d-4ca6-8466-b8bee3837457"
#define NS_IFINISHREPORTINGCALLBACK_IID \
{0x548b3909, 0xc04d, 0x4ca6, \
{ 0x84, 0x66, 0xb8, 0xbe, 0xe3, 0x83, 0x74, 0x57 }}
class NS_NO_VTABLE nsIFinishReportingCallback : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFINISHREPORTINGCALLBACK_IID)
/* void callback (in nsISupports data); */
NS_IMETHOD Callback(nsISupports *data) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIFinishReportingCallback, NS_IFINISHREPORTINGCALLBACK_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIFINISHREPORTINGCALLBACK \
NS_IMETHOD Callback(nsISupports *data) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIFINISHREPORTINGCALLBACK \
NS_METHOD Callback(nsISupports *data);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIFINISHREPORTINGCALLBACK(_to) \
NS_IMETHOD Callback(nsISupports *data) override { return _to Callback(data); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIFINISHREPORTINGCALLBACK(_to) \
NS_IMETHOD Callback(nsISupports *data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Callback(data); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsFinishReportingCallback : public nsIFinishReportingCallback
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIFINISHREPORTINGCALLBACK
nsFinishReportingCallback();
private:
~nsFinishReportingCallback();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsFinishReportingCallback, nsIFinishReportingCallback)
nsFinishReportingCallback::nsFinishReportingCallback()
{
/* member initializers and constructor code */
}
nsFinishReportingCallback::~nsFinishReportingCallback()
{
/* destructor code */
}
/* void callback (in nsISupports data); */
NS_IMETHODIMP nsFinishReportingCallback::Callback(nsISupports *data)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIMemoryReporterManager */
#define NS_IMEMORYREPORTERMANAGER_IID_STR "2998574d-8993-407a-b1a5-8ad7417653e1"
#define NS_IMEMORYREPORTERMANAGER_IID \
{0x2998574d, 0x8993, 0x407a, \
{ 0xb1, 0xa5, 0x8a, 0xd7, 0x41, 0x76, 0x53, 0xe1 }}
class NS_NO_VTABLE nsIMemoryReporterManager : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMEMORYREPORTERMANAGER_IID)
/* [must_use] void init (); */
MOZ_MUST_USE NS_IMETHOD Init(void) = 0;
/* void registerStrongReporter (in nsIMemoryReporter reporter); */
NS_IMETHOD RegisterStrongReporter(nsIMemoryReporter *reporter) = 0;
/* void registerStrongAsyncReporter (in nsIMemoryReporter reporter); */
NS_IMETHOD RegisterStrongAsyncReporter(nsIMemoryReporter *reporter) = 0;
/* void registerWeakReporter (in nsIMemoryReporter reporter); */
NS_IMETHOD RegisterWeakReporter(nsIMemoryReporter *reporter) = 0;
/* void registerWeakAsyncReporter (in nsIMemoryReporter reporter); */
NS_IMETHOD RegisterWeakAsyncReporter(nsIMemoryReporter *reporter) = 0;
/* void unregisterStrongReporter (in nsIMemoryReporter reporter); */
NS_IMETHOD UnregisterStrongReporter(nsIMemoryReporter *reporter) = 0;
/* void unregisterWeakReporter (in nsIMemoryReporter reporter); */
NS_IMETHOD UnregisterWeakReporter(nsIMemoryReporter *reporter) = 0;
/* void blockRegistrationAndHideExistingReporters (); */
NS_IMETHOD BlockRegistrationAndHideExistingReporters(void) = 0;
/* void unblockRegistrationAndRestoreOriginalReporters (); */
NS_IMETHOD UnblockRegistrationAndRestoreOriginalReporters(void) = 0;
/* void registerStrongReporterEvenIfBlocked (in nsIMemoryReporter aReporter); */
NS_IMETHOD RegisterStrongReporterEvenIfBlocked(nsIMemoryReporter *aReporter) = 0;
/* void getReports (in nsIMemoryReporterCallback handleReport, in nsISupports handleReportData, in nsIFinishReportingCallback finishReporting, in nsISupports finishReportingData, in boolean anonymize); */
NS_IMETHOD GetReports(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize) = 0;
/* [noscript] void getReportsExtended (in nsIMemoryReporterCallback handleReport, in nsISupports handleReportData, in nsIFinishReportingCallback finishReporting, in nsISupports finishReportingData, in boolean anonymize, in boolean minimizeMemoryUsage, in AString DMDDumpIdent); */
NS_IMETHOD GetReportsExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize, bool minimizeMemoryUsage, const nsAString & DMDDumpIdent) = 0;
/* [noscript] void getReportsForThisProcessExtended (in nsIMemoryReporterCallback handleReport, in nsISupports handleReportData, in boolean anonymize, in FILE DMDFile, in nsIFinishReportingCallback finishReporting, in nsISupports finishReportingData); */
NS_IMETHOD GetReportsForThisProcessExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, bool anonymize, FILE *DMDFile, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData) = 0;
/* [noscript] void endReport (); */
NS_IMETHOD EndReport(void) = 0;
/* [must_use] readonly attribute int64_t vsize; */
MOZ_MUST_USE NS_IMETHOD GetVsize(int64_t *aVsize) = 0;
/* [must_use] readonly attribute int64_t vsizeMaxContiguous; */
MOZ_MUST_USE NS_IMETHOD GetVsizeMaxContiguous(int64_t *aVsizeMaxContiguous) = 0;
/* [must_use] readonly attribute int64_t resident; */
MOZ_MUST_USE NS_IMETHOD GetResident(int64_t *aResident) = 0;
/* [must_use] readonly attribute int64_t residentFast; */
MOZ_MUST_USE NS_IMETHOD GetResidentFast(int64_t *aResidentFast) = 0;
/* [must_use] readonly attribute int64_t residentPeak; */
MOZ_MUST_USE NS_IMETHOD GetResidentPeak(int64_t *aResidentPeak) = 0;
/* [must_use] readonly attribute int64_t residentUnique; */
MOZ_MUST_USE NS_IMETHOD GetResidentUnique(int64_t *aResidentUnique) = 0;
/* [must_use] readonly attribute int64_t heapAllocated; */
MOZ_MUST_USE NS_IMETHOD GetHeapAllocated(int64_t *aHeapAllocated) = 0;
/* [must_use] readonly attribute int64_t heapOverheadFraction; */
MOZ_MUST_USE NS_IMETHOD GetHeapOverheadFraction(int64_t *aHeapOverheadFraction) = 0;
/* [must_use] readonly attribute int64_t JSMainRuntimeGCHeap; */
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeGCHeap(int64_t *aJSMainRuntimeGCHeap) = 0;
/* [must_use] readonly attribute int64_t JSMainRuntimeTemporaryPeak; */
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeTemporaryPeak(int64_t *aJSMainRuntimeTemporaryPeak) = 0;
/* [must_use] readonly attribute int64_t JSMainRuntimeCompartmentsSystem; */
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeCompartmentsSystem(int64_t *aJSMainRuntimeCompartmentsSystem) = 0;
/* [must_use] readonly attribute int64_t JSMainRuntimeCompartmentsUser; */
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeCompartmentsUser(int64_t *aJSMainRuntimeCompartmentsUser) = 0;
/* [must_use] readonly attribute int64_t imagesContentUsedUncompressed; */
MOZ_MUST_USE NS_IMETHOD GetImagesContentUsedUncompressed(int64_t *aImagesContentUsedUncompressed) = 0;
/* [must_use] readonly attribute int64_t storageSQLite; */
MOZ_MUST_USE NS_IMETHOD GetStorageSQLite(int64_t *aStorageSQLite) = 0;
/* [must_use] readonly attribute int64_t lowMemoryEventsVirtual; */
MOZ_MUST_USE NS_IMETHOD GetLowMemoryEventsVirtual(int64_t *aLowMemoryEventsVirtual) = 0;
/* [must_use] readonly attribute int64_t lowMemoryEventsPhysical; */
MOZ_MUST_USE NS_IMETHOD GetLowMemoryEventsPhysical(int64_t *aLowMemoryEventsPhysical) = 0;
/* [must_use] readonly attribute int64_t ghostWindows; */
MOZ_MUST_USE NS_IMETHOD GetGhostWindows(int64_t *aGhostWindows) = 0;
/* [must_use] readonly attribute int64_t pageFaultsHard; */
MOZ_MUST_USE NS_IMETHOD GetPageFaultsHard(int64_t *aPageFaultsHard) = 0;
/* [infallible] readonly attribute boolean hasMozMallocUsableSize; */
NS_IMETHOD GetHasMozMallocUsableSize(bool *aHasMozMallocUsableSize) = 0;
inline bool GetHasMozMallocUsableSize()
{
bool result;
mozilla::DebugOnly<nsresult> rv = GetHasMozMallocUsableSize(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
/* [infallible] readonly attribute boolean isDMDEnabled; */
NS_IMETHOD GetIsDMDEnabled(bool *aIsDMDEnabled) = 0;
inline bool GetIsDMDEnabled()
{
bool result;
mozilla::DebugOnly<nsresult> rv = GetIsDMDEnabled(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
/* [infallible] readonly attribute boolean isDMDRunning; */
NS_IMETHOD GetIsDMDRunning(bool *aIsDMDRunning) = 0;
inline bool GetIsDMDRunning()
{
bool result;
mozilla::DebugOnly<nsresult> rv = GetIsDMDRunning(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
/* [must_use] void minimizeMemoryUsage (in nsIRunnable callback); */
MOZ_MUST_USE NS_IMETHOD MinimizeMemoryUsage(nsIRunnable *callback) = 0;
/* [must_use] void sizeOfTab (in mozIDOMWindowProxy window, out int64_t jsObjectsSize, out int64_t jsStringsSize, out int64_t jsOtherSize, out int64_t domSize, out int64_t styleSize, out int64_t otherSize, out int64_t totalSize, out double jsMilliseconds, out double nonJSMilliseconds); */
MOZ_MUST_USE NS_IMETHOD SizeOfTab(mozIDOMWindowProxy *window, int64_t *jsObjectsSize, int64_t *jsStringsSize, int64_t *jsOtherSize, int64_t *domSize, int64_t *styleSize, int64_t *otherSize, int64_t *totalSize, double *jsMilliseconds, double *nonJSMilliseconds) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIMemoryReporterManager, NS_IMEMORYREPORTERMANAGER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMEMORYREPORTERMANAGER \
MOZ_MUST_USE NS_IMETHOD Init(void) override; \
NS_IMETHOD RegisterStrongReporter(nsIMemoryReporter *reporter) override; \
NS_IMETHOD RegisterStrongAsyncReporter(nsIMemoryReporter *reporter) override; \
NS_IMETHOD RegisterWeakReporter(nsIMemoryReporter *reporter) override; \
NS_IMETHOD RegisterWeakAsyncReporter(nsIMemoryReporter *reporter) override; \
NS_IMETHOD UnregisterStrongReporter(nsIMemoryReporter *reporter) override; \
NS_IMETHOD UnregisterWeakReporter(nsIMemoryReporter *reporter) override; \
NS_IMETHOD BlockRegistrationAndHideExistingReporters(void) override; \
NS_IMETHOD UnblockRegistrationAndRestoreOriginalReporters(void) override; \
NS_IMETHOD RegisterStrongReporterEvenIfBlocked(nsIMemoryReporter *aReporter) override; \
NS_IMETHOD GetReports(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize) override; \
NS_IMETHOD GetReportsExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize, bool minimizeMemoryUsage, const nsAString & DMDDumpIdent) override; \
NS_IMETHOD GetReportsForThisProcessExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, bool anonymize, FILE *DMDFile, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData) override; \
NS_IMETHOD EndReport(void) override; \
MOZ_MUST_USE NS_IMETHOD GetVsize(int64_t *aVsize) override; \
MOZ_MUST_USE NS_IMETHOD GetVsizeMaxContiguous(int64_t *aVsizeMaxContiguous) override; \
MOZ_MUST_USE NS_IMETHOD GetResident(int64_t *aResident) override; \
MOZ_MUST_USE NS_IMETHOD GetResidentFast(int64_t *aResidentFast) override; \
MOZ_MUST_USE NS_IMETHOD GetResidentPeak(int64_t *aResidentPeak) override; \
MOZ_MUST_USE NS_IMETHOD GetResidentUnique(int64_t *aResidentUnique) override; \
MOZ_MUST_USE NS_IMETHOD GetHeapAllocated(int64_t *aHeapAllocated) override; \
MOZ_MUST_USE NS_IMETHOD GetHeapOverheadFraction(int64_t *aHeapOverheadFraction) override; \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeGCHeap(int64_t *aJSMainRuntimeGCHeap) override; \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeTemporaryPeak(int64_t *aJSMainRuntimeTemporaryPeak) override; \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeCompartmentsSystem(int64_t *aJSMainRuntimeCompartmentsSystem) override; \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeCompartmentsUser(int64_t *aJSMainRuntimeCompartmentsUser) override; \
MOZ_MUST_USE NS_IMETHOD GetImagesContentUsedUncompressed(int64_t *aImagesContentUsedUncompressed) override; \
MOZ_MUST_USE NS_IMETHOD GetStorageSQLite(int64_t *aStorageSQLite) override; \
MOZ_MUST_USE NS_IMETHOD GetLowMemoryEventsVirtual(int64_t *aLowMemoryEventsVirtual) override; \
MOZ_MUST_USE NS_IMETHOD GetLowMemoryEventsPhysical(int64_t *aLowMemoryEventsPhysical) override; \
MOZ_MUST_USE NS_IMETHOD GetGhostWindows(int64_t *aGhostWindows) override; \
MOZ_MUST_USE NS_IMETHOD GetPageFaultsHard(int64_t *aPageFaultsHard) override; \
using nsIMemoryReporterManager::GetHasMozMallocUsableSize; \
NS_IMETHOD GetHasMozMallocUsableSize(bool *aHasMozMallocUsableSize) override; \
using nsIMemoryReporterManager::GetIsDMDEnabled; \
NS_IMETHOD GetIsDMDEnabled(bool *aIsDMDEnabled) override; \
using nsIMemoryReporterManager::GetIsDMDRunning; \
NS_IMETHOD GetIsDMDRunning(bool *aIsDMDRunning) override; \
MOZ_MUST_USE NS_IMETHOD MinimizeMemoryUsage(nsIRunnable *callback) override; \
MOZ_MUST_USE NS_IMETHOD SizeOfTab(mozIDOMWindowProxy *window, int64_t *jsObjectsSize, int64_t *jsStringsSize, int64_t *jsOtherSize, int64_t *domSize, int64_t *styleSize, int64_t *otherSize, int64_t *totalSize, double *jsMilliseconds, double *nonJSMilliseconds) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIMEMORYREPORTERMANAGER \
MOZ_MUST_USE NS_METHOD Init(void); \
NS_METHOD RegisterStrongReporter(nsIMemoryReporter *reporter); \
NS_METHOD RegisterStrongAsyncReporter(nsIMemoryReporter *reporter); \
NS_METHOD RegisterWeakReporter(nsIMemoryReporter *reporter); \
NS_METHOD RegisterWeakAsyncReporter(nsIMemoryReporter *reporter); \
NS_METHOD UnregisterStrongReporter(nsIMemoryReporter *reporter); \
NS_METHOD UnregisterWeakReporter(nsIMemoryReporter *reporter); \
NS_METHOD BlockRegistrationAndHideExistingReporters(void); \
NS_METHOD UnblockRegistrationAndRestoreOriginalReporters(void); \
NS_METHOD RegisterStrongReporterEvenIfBlocked(nsIMemoryReporter *aReporter); \
NS_METHOD GetReports(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize); \
NS_METHOD GetReportsExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize, bool minimizeMemoryUsage, const nsAString & DMDDumpIdent); \
NS_METHOD GetReportsForThisProcessExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, bool anonymize, FILE *DMDFile, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData); \
NS_METHOD EndReport(void); \
MOZ_MUST_USE NS_METHOD GetVsize(int64_t *aVsize); \
MOZ_MUST_USE NS_METHOD GetVsizeMaxContiguous(int64_t *aVsizeMaxContiguous); \
MOZ_MUST_USE NS_METHOD GetResident(int64_t *aResident); \
MOZ_MUST_USE NS_METHOD GetResidentFast(int64_t *aResidentFast); \
MOZ_MUST_USE NS_METHOD GetResidentPeak(int64_t *aResidentPeak); \
MOZ_MUST_USE NS_METHOD GetResidentUnique(int64_t *aResidentUnique); \
MOZ_MUST_USE NS_METHOD GetHeapAllocated(int64_t *aHeapAllocated); \
MOZ_MUST_USE NS_METHOD GetHeapOverheadFraction(int64_t *aHeapOverheadFraction); \
MOZ_MUST_USE NS_METHOD GetJSMainRuntimeGCHeap(int64_t *aJSMainRuntimeGCHeap); \
MOZ_MUST_USE NS_METHOD GetJSMainRuntimeTemporaryPeak(int64_t *aJSMainRuntimeTemporaryPeak); \
MOZ_MUST_USE NS_METHOD GetJSMainRuntimeCompartmentsSystem(int64_t *aJSMainRuntimeCompartmentsSystem); \
MOZ_MUST_USE NS_METHOD GetJSMainRuntimeCompartmentsUser(int64_t *aJSMainRuntimeCompartmentsUser); \
MOZ_MUST_USE NS_METHOD GetImagesContentUsedUncompressed(int64_t *aImagesContentUsedUncompressed); \
MOZ_MUST_USE NS_METHOD GetStorageSQLite(int64_t *aStorageSQLite); \
MOZ_MUST_USE NS_METHOD GetLowMemoryEventsVirtual(int64_t *aLowMemoryEventsVirtual); \
MOZ_MUST_USE NS_METHOD GetLowMemoryEventsPhysical(int64_t *aLowMemoryEventsPhysical); \
MOZ_MUST_USE NS_METHOD GetGhostWindows(int64_t *aGhostWindows); \
MOZ_MUST_USE NS_METHOD GetPageFaultsHard(int64_t *aPageFaultsHard); \
using nsIMemoryReporterManager::GetHasMozMallocUsableSize; \
NS_METHOD GetHasMozMallocUsableSize(bool *aHasMozMallocUsableSize); \
using nsIMemoryReporterManager::GetIsDMDEnabled; \
NS_METHOD GetIsDMDEnabled(bool *aIsDMDEnabled); \
using nsIMemoryReporterManager::GetIsDMDRunning; \
NS_METHOD GetIsDMDRunning(bool *aIsDMDRunning); \
MOZ_MUST_USE NS_METHOD MinimizeMemoryUsage(nsIRunnable *callback); \
MOZ_MUST_USE NS_METHOD SizeOfTab(mozIDOMWindowProxy *window, int64_t *jsObjectsSize, int64_t *jsStringsSize, int64_t *jsOtherSize, int64_t *domSize, int64_t *styleSize, int64_t *otherSize, int64_t *totalSize, double *jsMilliseconds, double *nonJSMilliseconds);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMEMORYREPORTERMANAGER(_to) \
MOZ_MUST_USE NS_IMETHOD Init(void) override { return _to Init(); } \
NS_IMETHOD RegisterStrongReporter(nsIMemoryReporter *reporter) override { return _to RegisterStrongReporter(reporter); } \
NS_IMETHOD RegisterStrongAsyncReporter(nsIMemoryReporter *reporter) override { return _to RegisterStrongAsyncReporter(reporter); } \
NS_IMETHOD RegisterWeakReporter(nsIMemoryReporter *reporter) override { return _to RegisterWeakReporter(reporter); } \
NS_IMETHOD RegisterWeakAsyncReporter(nsIMemoryReporter *reporter) override { return _to RegisterWeakAsyncReporter(reporter); } \
NS_IMETHOD UnregisterStrongReporter(nsIMemoryReporter *reporter) override { return _to UnregisterStrongReporter(reporter); } \
NS_IMETHOD UnregisterWeakReporter(nsIMemoryReporter *reporter) override { return _to UnregisterWeakReporter(reporter); } \
NS_IMETHOD BlockRegistrationAndHideExistingReporters(void) override { return _to BlockRegistrationAndHideExistingReporters(); } \
NS_IMETHOD UnblockRegistrationAndRestoreOriginalReporters(void) override { return _to UnblockRegistrationAndRestoreOriginalReporters(); } \
NS_IMETHOD RegisterStrongReporterEvenIfBlocked(nsIMemoryReporter *aReporter) override { return _to RegisterStrongReporterEvenIfBlocked(aReporter); } \
NS_IMETHOD GetReports(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize) override { return _to GetReports(handleReport, handleReportData, finishReporting, finishReportingData, anonymize); } \
NS_IMETHOD GetReportsExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize, bool minimizeMemoryUsage, const nsAString & DMDDumpIdent) override { return _to GetReportsExtended(handleReport, handleReportData, finishReporting, finishReportingData, anonymize, minimizeMemoryUsage, DMDDumpIdent); } \
NS_IMETHOD GetReportsForThisProcessExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, bool anonymize, FILE *DMDFile, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData) override { return _to GetReportsForThisProcessExtended(handleReport, handleReportData, anonymize, DMDFile, finishReporting, finishReportingData); } \
NS_IMETHOD EndReport(void) override { return _to EndReport(); } \
MOZ_MUST_USE NS_IMETHOD GetVsize(int64_t *aVsize) override { return _to GetVsize(aVsize); } \
MOZ_MUST_USE NS_IMETHOD GetVsizeMaxContiguous(int64_t *aVsizeMaxContiguous) override { return _to GetVsizeMaxContiguous(aVsizeMaxContiguous); } \
MOZ_MUST_USE NS_IMETHOD GetResident(int64_t *aResident) override { return _to GetResident(aResident); } \
MOZ_MUST_USE NS_IMETHOD GetResidentFast(int64_t *aResidentFast) override { return _to GetResidentFast(aResidentFast); } \
MOZ_MUST_USE NS_IMETHOD GetResidentPeak(int64_t *aResidentPeak) override { return _to GetResidentPeak(aResidentPeak); } \
MOZ_MUST_USE NS_IMETHOD GetResidentUnique(int64_t *aResidentUnique) override { return _to GetResidentUnique(aResidentUnique); } \
MOZ_MUST_USE NS_IMETHOD GetHeapAllocated(int64_t *aHeapAllocated) override { return _to GetHeapAllocated(aHeapAllocated); } \
MOZ_MUST_USE NS_IMETHOD GetHeapOverheadFraction(int64_t *aHeapOverheadFraction) override { return _to GetHeapOverheadFraction(aHeapOverheadFraction); } \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeGCHeap(int64_t *aJSMainRuntimeGCHeap) override { return _to GetJSMainRuntimeGCHeap(aJSMainRuntimeGCHeap); } \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeTemporaryPeak(int64_t *aJSMainRuntimeTemporaryPeak) override { return _to GetJSMainRuntimeTemporaryPeak(aJSMainRuntimeTemporaryPeak); } \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeCompartmentsSystem(int64_t *aJSMainRuntimeCompartmentsSystem) override { return _to GetJSMainRuntimeCompartmentsSystem(aJSMainRuntimeCompartmentsSystem); } \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeCompartmentsUser(int64_t *aJSMainRuntimeCompartmentsUser) override { return _to GetJSMainRuntimeCompartmentsUser(aJSMainRuntimeCompartmentsUser); } \
MOZ_MUST_USE NS_IMETHOD GetImagesContentUsedUncompressed(int64_t *aImagesContentUsedUncompressed) override { return _to GetImagesContentUsedUncompressed(aImagesContentUsedUncompressed); } \
MOZ_MUST_USE NS_IMETHOD GetStorageSQLite(int64_t *aStorageSQLite) override { return _to GetStorageSQLite(aStorageSQLite); } \
MOZ_MUST_USE NS_IMETHOD GetLowMemoryEventsVirtual(int64_t *aLowMemoryEventsVirtual) override { return _to GetLowMemoryEventsVirtual(aLowMemoryEventsVirtual); } \
MOZ_MUST_USE NS_IMETHOD GetLowMemoryEventsPhysical(int64_t *aLowMemoryEventsPhysical) override { return _to GetLowMemoryEventsPhysical(aLowMemoryEventsPhysical); } \
MOZ_MUST_USE NS_IMETHOD GetGhostWindows(int64_t *aGhostWindows) override { return _to GetGhostWindows(aGhostWindows); } \
MOZ_MUST_USE NS_IMETHOD GetPageFaultsHard(int64_t *aPageFaultsHard) override { return _to GetPageFaultsHard(aPageFaultsHard); } \
using nsIMemoryReporterManager::GetHasMozMallocUsableSize; \
NS_IMETHOD GetHasMozMallocUsableSize(bool *aHasMozMallocUsableSize) override { return _to GetHasMozMallocUsableSize(aHasMozMallocUsableSize); } \
using nsIMemoryReporterManager::GetIsDMDEnabled; \
NS_IMETHOD GetIsDMDEnabled(bool *aIsDMDEnabled) override { return _to GetIsDMDEnabled(aIsDMDEnabled); } \
using nsIMemoryReporterManager::GetIsDMDRunning; \
NS_IMETHOD GetIsDMDRunning(bool *aIsDMDRunning) override { return _to GetIsDMDRunning(aIsDMDRunning); } \
MOZ_MUST_USE NS_IMETHOD MinimizeMemoryUsage(nsIRunnable *callback) override { return _to MinimizeMemoryUsage(callback); } \
MOZ_MUST_USE NS_IMETHOD SizeOfTab(mozIDOMWindowProxy *window, int64_t *jsObjectsSize, int64_t *jsStringsSize, int64_t *jsOtherSize, int64_t *domSize, int64_t *styleSize, int64_t *otherSize, int64_t *totalSize, double *jsMilliseconds, double *nonJSMilliseconds) override { return _to SizeOfTab(window, jsObjectsSize, jsStringsSize, jsOtherSize, domSize, styleSize, otherSize, totalSize, jsMilliseconds, nonJSMilliseconds); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMEMORYREPORTERMANAGER(_to) \
MOZ_MUST_USE NS_IMETHOD Init(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(); } \
NS_IMETHOD RegisterStrongReporter(nsIMemoryReporter *reporter) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterStrongReporter(reporter); } \
NS_IMETHOD RegisterStrongAsyncReporter(nsIMemoryReporter *reporter) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterStrongAsyncReporter(reporter); } \
NS_IMETHOD RegisterWeakReporter(nsIMemoryReporter *reporter) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterWeakReporter(reporter); } \
NS_IMETHOD RegisterWeakAsyncReporter(nsIMemoryReporter *reporter) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterWeakAsyncReporter(reporter); } \
NS_IMETHOD UnregisterStrongReporter(nsIMemoryReporter *reporter) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterStrongReporter(reporter); } \
NS_IMETHOD UnregisterWeakReporter(nsIMemoryReporter *reporter) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterWeakReporter(reporter); } \
NS_IMETHOD BlockRegistrationAndHideExistingReporters(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BlockRegistrationAndHideExistingReporters(); } \
NS_IMETHOD UnblockRegistrationAndRestoreOriginalReporters(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnblockRegistrationAndRestoreOriginalReporters(); } \
NS_IMETHOD RegisterStrongReporterEvenIfBlocked(nsIMemoryReporter *aReporter) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterStrongReporterEvenIfBlocked(aReporter); } \
NS_IMETHOD GetReports(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReports(handleReport, handleReportData, finishReporting, finishReportingData, anonymize); } \
NS_IMETHOD GetReportsExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize, bool minimizeMemoryUsage, const nsAString & DMDDumpIdent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReportsExtended(handleReport, handleReportData, finishReporting, finishReportingData, anonymize, minimizeMemoryUsage, DMDDumpIdent); } \
NS_IMETHOD GetReportsForThisProcessExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, bool anonymize, FILE *DMDFile, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReportsForThisProcessExtended(handleReport, handleReportData, anonymize, DMDFile, finishReporting, finishReportingData); } \
NS_IMETHOD EndReport(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EndReport(); } \
MOZ_MUST_USE NS_IMETHOD GetVsize(int64_t *aVsize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVsize(aVsize); } \
MOZ_MUST_USE NS_IMETHOD GetVsizeMaxContiguous(int64_t *aVsizeMaxContiguous) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVsizeMaxContiguous(aVsizeMaxContiguous); } \
MOZ_MUST_USE NS_IMETHOD GetResident(int64_t *aResident) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResident(aResident); } \
MOZ_MUST_USE NS_IMETHOD GetResidentFast(int64_t *aResidentFast) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResidentFast(aResidentFast); } \
MOZ_MUST_USE NS_IMETHOD GetResidentPeak(int64_t *aResidentPeak) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResidentPeak(aResidentPeak); } \
MOZ_MUST_USE NS_IMETHOD GetResidentUnique(int64_t *aResidentUnique) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResidentUnique(aResidentUnique); } \
MOZ_MUST_USE NS_IMETHOD GetHeapAllocated(int64_t *aHeapAllocated) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeapAllocated(aHeapAllocated); } \
MOZ_MUST_USE NS_IMETHOD GetHeapOverheadFraction(int64_t *aHeapOverheadFraction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeapOverheadFraction(aHeapOverheadFraction); } \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeGCHeap(int64_t *aJSMainRuntimeGCHeap) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSMainRuntimeGCHeap(aJSMainRuntimeGCHeap); } \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeTemporaryPeak(int64_t *aJSMainRuntimeTemporaryPeak) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSMainRuntimeTemporaryPeak(aJSMainRuntimeTemporaryPeak); } \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeCompartmentsSystem(int64_t *aJSMainRuntimeCompartmentsSystem) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSMainRuntimeCompartmentsSystem(aJSMainRuntimeCompartmentsSystem); } \
MOZ_MUST_USE NS_IMETHOD GetJSMainRuntimeCompartmentsUser(int64_t *aJSMainRuntimeCompartmentsUser) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSMainRuntimeCompartmentsUser(aJSMainRuntimeCompartmentsUser); } \
MOZ_MUST_USE NS_IMETHOD GetImagesContentUsedUncompressed(int64_t *aImagesContentUsedUncompressed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImagesContentUsedUncompressed(aImagesContentUsedUncompressed); } \
MOZ_MUST_USE NS_IMETHOD GetStorageSQLite(int64_t *aStorageSQLite) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStorageSQLite(aStorageSQLite); } \
MOZ_MUST_USE NS_IMETHOD GetLowMemoryEventsVirtual(int64_t *aLowMemoryEventsVirtual) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLowMemoryEventsVirtual(aLowMemoryEventsVirtual); } \
MOZ_MUST_USE NS_IMETHOD GetLowMemoryEventsPhysical(int64_t *aLowMemoryEventsPhysical) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLowMemoryEventsPhysical(aLowMemoryEventsPhysical); } \
MOZ_MUST_USE NS_IMETHOD GetGhostWindows(int64_t *aGhostWindows) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGhostWindows(aGhostWindows); } \
MOZ_MUST_USE NS_IMETHOD GetPageFaultsHard(int64_t *aPageFaultsHard) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageFaultsHard(aPageFaultsHard); } \
NS_IMETHOD GetHasMozMallocUsableSize(bool *aHasMozMallocUsableSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasMozMallocUsableSize(aHasMozMallocUsableSize); } \
NS_IMETHOD GetIsDMDEnabled(bool *aIsDMDEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDMDEnabled(aIsDMDEnabled); } \
NS_IMETHOD GetIsDMDRunning(bool *aIsDMDRunning) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDMDRunning(aIsDMDRunning); } \
MOZ_MUST_USE NS_IMETHOD MinimizeMemoryUsage(nsIRunnable *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MinimizeMemoryUsage(callback); } \
MOZ_MUST_USE NS_IMETHOD SizeOfTab(mozIDOMWindowProxy *window, int64_t *jsObjectsSize, int64_t *jsStringsSize, int64_t *jsOtherSize, int64_t *domSize, int64_t *styleSize, int64_t *otherSize, int64_t *totalSize, double *jsMilliseconds, double *nonJSMilliseconds) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeOfTab(window, jsObjectsSize, jsStringsSize, jsOtherSize, domSize, styleSize, otherSize, totalSize, jsMilliseconds, nonJSMilliseconds); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsMemoryReporterManager : public nsIMemoryReporterManager
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIMEMORYREPORTERMANAGER
nsMemoryReporterManager();
private:
~nsMemoryReporterManager();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsMemoryReporterManager, nsIMemoryReporterManager)
nsMemoryReporterManager::nsMemoryReporterManager()
{
/* member initializers and constructor code */
}
nsMemoryReporterManager::~nsMemoryReporterManager()
{
/* destructor code */
}
/* [must_use] void init (); */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::Init()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void registerStrongReporter (in nsIMemoryReporter reporter); */
NS_IMETHODIMP nsMemoryReporterManager::RegisterStrongReporter(nsIMemoryReporter *reporter)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void registerStrongAsyncReporter (in nsIMemoryReporter reporter); */
NS_IMETHODIMP nsMemoryReporterManager::RegisterStrongAsyncReporter(nsIMemoryReporter *reporter)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void registerWeakReporter (in nsIMemoryReporter reporter); */
NS_IMETHODIMP nsMemoryReporterManager::RegisterWeakReporter(nsIMemoryReporter *reporter)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void registerWeakAsyncReporter (in nsIMemoryReporter reporter); */
NS_IMETHODIMP nsMemoryReporterManager::RegisterWeakAsyncReporter(nsIMemoryReporter *reporter)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void unregisterStrongReporter (in nsIMemoryReporter reporter); */
NS_IMETHODIMP nsMemoryReporterManager::UnregisterStrongReporter(nsIMemoryReporter *reporter)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void unregisterWeakReporter (in nsIMemoryReporter reporter); */
NS_IMETHODIMP nsMemoryReporterManager::UnregisterWeakReporter(nsIMemoryReporter *reporter)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void blockRegistrationAndHideExistingReporters (); */
NS_IMETHODIMP nsMemoryReporterManager::BlockRegistrationAndHideExistingReporters()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void unblockRegistrationAndRestoreOriginalReporters (); */
NS_IMETHODIMP nsMemoryReporterManager::UnblockRegistrationAndRestoreOriginalReporters()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void registerStrongReporterEvenIfBlocked (in nsIMemoryReporter aReporter); */
NS_IMETHODIMP nsMemoryReporterManager::RegisterStrongReporterEvenIfBlocked(nsIMemoryReporter *aReporter)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getReports (in nsIMemoryReporterCallback handleReport, in nsISupports handleReportData, in nsIFinishReportingCallback finishReporting, in nsISupports finishReportingData, in boolean anonymize); */
NS_IMETHODIMP nsMemoryReporterManager::GetReports(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void getReportsExtended (in nsIMemoryReporterCallback handleReport, in nsISupports handleReportData, in nsIFinishReportingCallback finishReporting, in nsISupports finishReportingData, in boolean anonymize, in boolean minimizeMemoryUsage, in AString DMDDumpIdent); */
NS_IMETHODIMP nsMemoryReporterManager::GetReportsExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData, bool anonymize, bool minimizeMemoryUsage, const nsAString & DMDDumpIdent)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void getReportsForThisProcessExtended (in nsIMemoryReporterCallback handleReport, in nsISupports handleReportData, in boolean anonymize, in FILE DMDFile, in nsIFinishReportingCallback finishReporting, in nsISupports finishReportingData); */
NS_IMETHODIMP nsMemoryReporterManager::GetReportsForThisProcessExtended(nsIMemoryReporterCallback *handleReport, nsISupports *handleReportData, bool anonymize, FILE *DMDFile, nsIFinishReportingCallback *finishReporting, nsISupports *finishReportingData)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void endReport (); */
NS_IMETHODIMP nsMemoryReporterManager::EndReport()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t vsize; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetVsize(int64_t *aVsize)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t vsizeMaxContiguous; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetVsizeMaxContiguous(int64_t *aVsizeMaxContiguous)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t resident; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetResident(int64_t *aResident)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t residentFast; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetResidentFast(int64_t *aResidentFast)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t residentPeak; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetResidentPeak(int64_t *aResidentPeak)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t residentUnique; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetResidentUnique(int64_t *aResidentUnique)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t heapAllocated; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetHeapAllocated(int64_t *aHeapAllocated)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t heapOverheadFraction; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetHeapOverheadFraction(int64_t *aHeapOverheadFraction)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t JSMainRuntimeGCHeap; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetJSMainRuntimeGCHeap(int64_t *aJSMainRuntimeGCHeap)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t JSMainRuntimeTemporaryPeak; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetJSMainRuntimeTemporaryPeak(int64_t *aJSMainRuntimeTemporaryPeak)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t JSMainRuntimeCompartmentsSystem; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetJSMainRuntimeCompartmentsSystem(int64_t *aJSMainRuntimeCompartmentsSystem)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t JSMainRuntimeCompartmentsUser; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetJSMainRuntimeCompartmentsUser(int64_t *aJSMainRuntimeCompartmentsUser)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t imagesContentUsedUncompressed; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetImagesContentUsedUncompressed(int64_t *aImagesContentUsedUncompressed)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t storageSQLite; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetStorageSQLite(int64_t *aStorageSQLite)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t lowMemoryEventsVirtual; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetLowMemoryEventsVirtual(int64_t *aLowMemoryEventsVirtual)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t lowMemoryEventsPhysical; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetLowMemoryEventsPhysical(int64_t *aLowMemoryEventsPhysical)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t ghostWindows; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetGhostWindows(int64_t *aGhostWindows)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] readonly attribute int64_t pageFaultsHard; */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::GetPageFaultsHard(int64_t *aPageFaultsHard)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [infallible] readonly attribute boolean hasMozMallocUsableSize; */
NS_IMETHODIMP nsMemoryReporterManager::GetHasMozMallocUsableSize(bool *aHasMozMallocUsableSize)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [infallible] readonly attribute boolean isDMDEnabled; */
NS_IMETHODIMP nsMemoryReporterManager::GetIsDMDEnabled(bool *aIsDMDEnabled)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [infallible] readonly attribute boolean isDMDRunning; */
NS_IMETHODIMP nsMemoryReporterManager::GetIsDMDRunning(bool *aIsDMDRunning)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] void minimizeMemoryUsage (in nsIRunnable callback); */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::MinimizeMemoryUsage(nsIRunnable *callback)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [must_use] void sizeOfTab (in mozIDOMWindowProxy window, out int64_t jsObjectsSize, out int64_t jsStringsSize, out int64_t jsOtherSize, out int64_t domSize, out int64_t styleSize, out int64_t otherSize, out int64_t totalSize, out double jsMilliseconds, out double nonJSMilliseconds); */
MOZ_MUST_USE NS_IMETHODIMP nsMemoryReporterManager::SizeOfTab(mozIDOMWindowProxy *window, int64_t *jsObjectsSize, int64_t *jsStringsSize, int64_t *jsOtherSize, int64_t *domSize, int64_t *styleSize, int64_t *otherSize, int64_t *totalSize, double *jsMilliseconds, double *nonJSMilliseconds)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#include "js/TypeDecls.h"
#include "nsStringGlue.h"
#include "nsTArray.h"
class nsPIDOMWindowOuter;
// nsIHandleReportCallback is a better name, but keep nsIMemoryReporterCallback
// around for backwards compatibility.
typedef nsIMemoryReporterCallback nsIHandleReportCallback;
namespace mozilla {
// All the following registration/unregistration functions don't use
// MOZ_MUST_USE because ignoring failures is common and reasonable.
// Register a memory reporter. The manager service will hold a strong
// reference to this reporter.
XPCOM_API(nsresult) RegisterStrongMemoryReporter(nsIMemoryReporter* aReporter);
XPCOM_API(nsresult) RegisterStrongAsyncMemoryReporter(nsIMemoryReporter* aReporter);
// Register a memory reporter. The manager service will hold a weak reference
// to this reporter.
XPCOM_API(nsresult) RegisterWeakMemoryReporter(nsIMemoryReporter* aReporter);
XPCOM_API(nsresult) RegisterWeakAsyncMemoryReporter(nsIMemoryReporter* aReporter);
// Unregister a strong memory reporter.
XPCOM_API(nsresult) UnregisterStrongMemoryReporter(nsIMemoryReporter* aReporter);
// Unregister a weak memory reporter.
XPCOM_API(nsresult) UnregisterWeakMemoryReporter(nsIMemoryReporter* aReporter);
// The memory reporter manager provides access to several distinguished
// amounts via attributes. Some of these amounts are provided by Gecko
// components that cannot be accessed directly from XPCOM code. So we provide
// the following functions for those components to be registered with the
// manager.
typedef int64_t (*InfallibleAmountFn)();
#define DECL_REGISTER_DISTINGUISHED_AMOUNT(kind, name) \
nsresult Register##name##DistinguishedAmount(kind##AmountFn aAmountFn);
#define DECL_UNREGISTER_DISTINGUISHED_AMOUNT(name) \
nsresult Unregister##name##DistinguishedAmount();
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, JSMainRuntimeGCHeap)
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, JSMainRuntimeTemporaryPeak)
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, JSMainRuntimeCompartmentsSystem)
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, JSMainRuntimeCompartmentsUser)
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, ImagesContentUsedUncompressed)
DECL_UNREGISTER_DISTINGUISHED_AMOUNT(ImagesContentUsedUncompressed)
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, StorageSQLite)
DECL_UNREGISTER_DISTINGUISHED_AMOUNT(StorageSQLite)
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, LowMemoryEventsVirtual)
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, LowMemoryEventsPhysical)
DECL_REGISTER_DISTINGUISHED_AMOUNT(Infallible, GhostWindows)
#undef DECL_REGISTER_DISTINGUISHED_AMOUNT
#undef DECL_UNREGISTER_DISTINGUISHED_AMOUNT
// Likewise for per-tab measurement.
typedef MOZ_MUST_USE nsresult (*JSSizeOfTabFn)(JSObject* aObj,
size_t* aJsObjectsSize,
size_t* aJsStringSize,
size_t* aJsPrivateSize,
size_t* aJsOtherSize);
typedef MOZ_MUST_USE nsresult (*NonJSSizeOfTabFn)(nsPIDOMWindowOuter* aWindow,
size_t* aDomSize,
size_t* aStyleSize,
size_t* aOtherSize);
nsresult RegisterJSSizeOfTab(JSSizeOfTabFn aSizeOfTabFn);
nsresult RegisterNonJSSizeOfTab(NonJSSizeOfTabFn aSizeOfTabFn);
}
#if defined(MOZ_DMD)
#if !defined(MOZ_MEMORY)
#error "MOZ_DMD requires MOZ_MEMORY"
#endif
#include "DMD.h"
#define MOZ_REPORT(ptr) mozilla::dmd::Report(ptr)
#define MOZ_REPORT_ON_ALLOC(ptr) mozilla::dmd::ReportOnAlloc(ptr)
#else
#define MOZ_REPORT(ptr)
#define MOZ_REPORT_ON_ALLOC(ptr)
#endif // defined(MOZ_DMD)
// Functions generated via this macro should be used by all traversal-based
// memory reporters. Such functions return |moz_malloc_size_of(ptr)|; this
// will always be zero on some obscure platforms.
//
// You might be wondering why we have a macro that creates multiple functions
// that differ only in their name, instead of a single MallocSizeOf function.
// It's mostly to help with DMD integration, though it sometimes also helps
// with debugging and temporary ad hoc profiling. The function name chosen
// doesn't matter greatly, but it's best to make it similar to the path used by
// the relevant memory reporter(s).
#define MOZ_DEFINE_MALLOC_SIZE_OF(fn) \
static size_t fn(const void* aPtr) \
{ \
MOZ_REPORT(aPtr); \
return moz_malloc_size_of(aPtr); \
}
// Functions generated by the next two macros should be used by wrapping
// allocators that report heap blocks as soon as they are allocated and
// unreport them as soon as they are freed. Such allocators are used in cases
// where we have third-party code that we cannot modify. The two functions
// must always be used in tandem.
#define MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(fn) \
static size_t fn(const void* aPtr) \
{ \
MOZ_REPORT_ON_ALLOC(aPtr); \
return moz_malloc_size_of(aPtr); \
}
#define MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(fn) \
static size_t fn(const void* aPtr) \
{ \
return moz_malloc_size_of(aPtr); \
}
// This macro assumes the presence of appropriate |aHandleReport| and |aData|
// variables. The (void) is there because we should always ignore the return
// value of the callback, because callback failures aren't fatal.
#define MOZ_COLLECT_REPORT(path, kind, units, amount, description) \
(void)aHandleReport->Callback(EmptyCString(), NS_LITERAL_CSTRING(path), \
kind, units, amount, \
NS_LITERAL_CSTRING(description), aData)
#endif /* __gen_nsIMemoryReporter_h__ */
|