From 642691dccd62a6eb967071eddb50fbc5cdeba46e Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Sun, 18 Nov 2001 18:33:06 +0000 Subject: [PATCH] fix the MallocTools anchor reference - docs only git-svn-id: svn://10.0.0.236/trunk@108446 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/doc/MemoryTools.html | 4 +- mozilla/xpcom/doc/xpcom_faq.html | 322 ++++++++++++++--------------- 2 files changed, 163 insertions(+), 163 deletions(-) diff --git a/mozilla/xpcom/doc/MemoryTools.html b/mozilla/xpcom/doc/MemoryTools.html index a139d401581..41e5f4c6a80 100644 --- a/mozilla/xpcom/doc/MemoryTools.html +++ b/mozilla/xpcom/doc/MemoryTools.html @@ -49,7 +49,7 @@ to leaves form stack traces that call malloc, calloc, realloc, and free, can by built in-process by building with --enable-trace-malloc and running with --trace-malloc filename.  As malloc, free, etc. are called, log events identifying the function call and its callsite are emitted to - filename. (more below).
+ filename. (more below).
  • Leaky - This tool also dumps out stack traces (in a slightly @@ -911,7 +911,7 @@ and a binary log of events and callsite relations will be written to filename machinery keeps track of all live allocations, and builds its tree of callsites to keep book on stack backtraces.

    -Tools such as bloatblame (xpcom/base/bloatblame.c) can be used to process +Tools such as bloatblame (tools/trace-malloc/bloatblame.c) can be used to process filename.  Try running with the unified output format option, -u.  The output is a large HTML file that hyperlinks ancestor and descendent libraries, classes, and functions diff --git a/mozilla/xpcom/doc/xpcom_faq.html b/mozilla/xpcom/doc/xpcom_faq.html index ffc0e83b9cc..5a0c976fad4 100644 --- a/mozilla/xpcom/doc/xpcom_faq.html +++ b/mozilla/xpcom/doc/xpcom_faq.html @@ -1,161 +1,161 @@ - - - - - - - xpCom FAQ - - -XPCOM FAQ -

    Get out your decoder rings kids! -

    Having a basic understanding of COM is only the first -
    step. To get CMonkey code to build and run, -
    you  need to translate your COM ideas into Netscape -
    speak. -

    Feel free to add to this document or change incorrect info. -
    Hopefully more info and more examples will help new -
    people reach XPCOM nirvana more quickly. -

    To mentally translate XPCOM to COM. -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    vanilla COMXPCOM
     IUnknownnsISupports
    IClassFactorynsIFactory
    virtual void _stdcallNS_IMETHOD
    interface ID = IIDnsID = nsIID = IID
    class ID = CLSID nsCID = CID
    - -

    Not too difficult. -
    But wait. There's more. -
    ------------------------------------------- -

    Why don't those classes have AddRef? -

    Actually, those classes do have AddRef. It is hidden -
    in a macro. There are alot of  macros that are alot of  help -
    once you know : -
        1) They exist. -

        2) Where they are defined. (They aren't always mnemonic -or onomatipeic. -
                -You might want to print them out.) -

                mozilla/xpcom/public/nsCom.h -
                -mozilla/xpcom/public/nsISupports.h -

        3)What they are -
                -Here's a short list to give you an idea of what you've been missing. -
                -The include files listed above are the real reference. -

        4) A quick way to expand pesky macros: -
                  -For macros in  foo.cpp,  'make foo.i' -

                This -will pump the foo.cpp file through C preprocessing -
                -and expand all the macros for you.  The output can be -
                -hard to read, but if you search for  unique strings -
                -in the area you aredebugging, you can navigate -
                -the file pretty easily. -
                -(thanks to hshaw@netscape.com) -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Netscape MACROExpansion of macro
    NSADDREF(factoryinstname)Factory->AddRef();
    NS_IMETHODvirtual nsresult __stdcall
    NS_INIT_REFCNT()mRefCnt = 0
    NS_INIT_ISUPPORTS()NS_INIT_REFCNT()
    NS_DECL_ISUPPORTSpublic: -
              NS_IMETHOD QueryInterface(REFNSIID -aIID, -
                                -void** aInstancePtr); -
              NS_IMETHOD_(nsrefcnt) -AddRef(void); -
              NS_IMETHOD_(nsrefcnt) -Release(void); -
        protected: -
              nsrefcnt mRefCnt;
    - -

     Useful Links to COM Documents: -

    XPCOM  Page -
    nsCOMPtr -
    Coding -Conventions -
    Getting BAMmed -
    How to COM -
    Modularization -Techniques -
    C++ -Portability Guide -
    NGLayout -
      -
      -
      - - + + + + + + + xpCom FAQ + + +XPCOM FAQ +

    Get out your decoder rings kids! +

    Having a basic understanding of COM is only the first +
    step. To get CMonkey code to build and run, +
    you  need to translate your COM ideas into Netscape +
    speak. +

    Feel free to add to this document or change incorrect info. +
    Hopefully more info and more examples will help new +
    people reach XPCOM nirvana more quickly. +

    To mentally translate XPCOM to COM. +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    vanilla COMXPCOM
     IUnknownnsISupports
    IClassFactorynsIFactory
    virtual void _stdcallNS_IMETHOD
    interface ID = IIDnsID = nsIID = IID
    class ID = CLSID nsCID = CID
    + +

    Not too difficult. +
    But wait. There's more. +
    ------------------------------------------- +

    Why don't those classes have AddRef? +

    Actually, those classes do have AddRef. It is hidden +
    in a macro. There are alot of  macros that are alot of  help +
    once you know : +
        1) They exist. +

        2) Where they are defined. (They aren't always mnemonic +or onomatipeic. +
                +You might want to print them out.) +

                mozilla/xpcom/public/nsCom.h +
                +mozilla/xpcom/public/nsISupports.h +

        3)What they are +
                +Here's a short list to give you an idea of what you've been missing. +
                +The include files listed above are the real reference. +

        4) A quick way to expand pesky macros: +
                  +For macros in  foo.cpp,  'make foo.i' +

                This +will pump the foo.cpp file through C preprocessing +
                +and expand all the macros for you.  The output can be +
                +hard to read, but if you search for  unique strings +
                +in the area you aredebugging, you can navigate +
                +the file pretty easily. +
                +(thanks to hshaw@netscape.com) +
      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Netscape MACROExpansion of macro
    NSADDREF(factoryinstname)Factory->AddRef();
    NS_IMETHODvirtual nsresult __stdcall
    NS_INIT_REFCNT()mRefCnt = 0
    NS_INIT_ISUPPORTS()NS_INIT_REFCNT()
    NS_DECL_ISUPPORTSpublic: +
              NS_IMETHOD QueryInterface(REFNSIID +aIID, +
                                +void** aInstancePtr); +
              NS_IMETHOD_(nsrefcnt) +AddRef(void); +
              NS_IMETHOD_(nsrefcnt) +Release(void); +
        protected: +
              nsrefcnt mRefCnt;
    + +

     Useful Links to COM Documents: +

    XPCOM  Page +
    nsCOMPtr +
    Coding +Conventions +
    Getting BAMmed +
    How to COM +
    Modularization +Techniques +
    C++ +Portability Guide +
    NGLayout +
      +
      +
      + +