User Tools

Site Tools


gpfs

GPFs

  • gpfs can be cause by code that does not compile.
  • use the script below to find it.
  • then execute 'EmMethodEdition useLinker: false' and reload the code/classes.
 [
    | apps cms |
    cms := Dictionary new.
    apps := Application currentlyLoaded select: [ :app |
        "app name startsWith: 'S'."
		app name = #DeflateInflateApp.    ].

    apps do: [ :app | | classes |
        Transcript cr;
            show: 'Testing app: ', app printString.
        EsLogManager loggerNamed: 'test' info: 'test' object: 'Testing: ', app printString.
        app isEdition ifFalse: [            app newEdition.        ].

        classes := OrderedCollection new
            addAll: app classes;
            addAll: ( app classes collect: [ :cls | cls class ] );            yourself.

        classes := classes reject: [ :cls | cls name asString = 'Object' ].
        classes := classes reject: [ :cls | cls name asString = 'Object class' ].

        classes do: [ :cls |
            ( cls methodNamesIn: app ) do: [ :sel | | cm |
                cm := cls compiledMethodAt: sel.
                ( cms at: cls ifAbsentPut: [ Dictionary new ] ) at: sel put: cm.            ].        ].

        classes do: [ :cls |
                EsLogManager loggerNamed: 'test' info: 'test' object: 'Testing: ', app printString, ' ', cls printString.
                Compiler
                    evaluate: cls definitionString
                    for: ( EmEvaluationRedirectionToCurrentImage new )
                    ifFail: [ :error | ].

                ( cls methodNamesIn: app ) do: [ :sel | | cm src ncm |
                    cm := ( cms at: cls ) at: sel.

                    src := cls sourceCodeAt: sel.
                    ncm := cls basicCompile: src notifying: cls ifFail: [].

                    cm bytecodes = ncm bytecodes ifFalse: [
                        Transcript cr;
                            show: 'Failed method: ', cm printString.
                        EsLogManager loggerNamed: 'test' info: 'test' object: 'Failed method: ', cm printString.
                    ].
                ].
            ].
    ].
] forkNamed: 'Recompile'

===============================================================
CompiledMethod withAllSubclasses
    inject: OrderedCollection new
    into: [:all :cmCls | | failedToCompile |
        failedToCompile := cmCls allInstances reject: [:e | e compiledCorrectly].
        all addAll: failedToCompile; yourself]
	
gpfs.txt · Last modified: 2015/05/13 10:51 by 127.0.0.1