def METHOD_NAME(startnum, endnum, mmtracefile):
    # dump that frame
    #c:\utilities\apitrace-8.0.20190414-win64\bin\apitrace.exe dump mmconsole.trace --calls=23165-23562
    args = [the_apitrace, 'dump', '--calls=' + startnum + '-' + endnum, '--color=never', mmtracefile]
    proc = subprocess.run(args, capture_output=True)
    res = proc.stdout.decode("utf-8") 
    #find interesting debuggroups
    # 30079 glPushDebugGroup(source = GL_DEBUG_SOURCE_APPLICATION, id = 1234, length = -1, message = "SphereRenderer::Render")
    commands = res.split(os.linesep)
    done = {}
    groupstart = 0
    groupend = 0
    currgroup = ""
    for c in commands:
        m = re.search(r'^(\d+)\s+glPopDebugGroup', c)
        if m:
            groupend = m.group(1)
            if len(groupstack) == 0:
                print("found pop without push: " + c)
            else:
                groupstart, currgroup = groupstack.pop()
                print("found end of debug group " + currgroup + " " + groupstart + "-" + groupend)
                if int(groupend) - int(groupstart) == 1:
                    print("no content")
                else:
                    # dump both states
                    # c:\utilities\apitrace-msvc\x64\bin\apitrace.exe replay -D 167273 mmconsole.1.trace > before.json
                    args = [the_apitrace, 'replay', '-D', groupstart, mmtracefile]
                    proc = subprocess.run(args, capture_output=True)
                    text = safeString(proc.stdout.decode("ascii"))
                    before = json.loads(text)
                    args = [the_apitrace, 'replay', '-D', groupend, mmtracefile]
                    proc = subprocess.run(args, capture_output=True)
                    text = safeString(proc.stdout.decode("ascii"))
                    after = json.loads(text)
                    diffstr = jsondiff.diff(before, after, marshal=True)
                    print("found differences:")
                    json.dump(diffstr, sys.stdout, indent=2)
                    print("")
        m = re.search(r'^(\d+)\s+glPushDebugGroup', c)
        if m:
            thestart = m.group(1)
            m = re.search(r',\s+id\s+=\s+(\d+)', c)
            if m:
                m = re.search(r',\s+message\s+=\s+"(.*?)"', c)
                if m:
                    thingy = m.group(1)
                    if thingy in done:
                        print("already looked at " + thingy)
                    else:
                        print("looking at " + thingy)
                        # do not look twice. the first frame seems to be
                        # different though, so I deactivated this
                        # done[thingy] = 1
                        groupstack.append([thestart, thingy])
                        #groupstart = thestart
                        #currgroup = thingy
                        #ingroup = True