4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://floralicense.org/license/
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
40 flag.StringVar(&infile, "i", "ppdi.drv", "input drv file")
41 flag.StringVar(&outfile, "o", "stripped.drv", "output file")
42 flag.StringVar(&cpuprofile, "p", "", "write cpu profile to file")
43 flag.StringVar(&memprofile, "m", "", "write memory profile to this file")
50 f, err := os.Create(cpuprofile)
54 pprof.StartCPUProfile(f)
55 defer pprof.StopCPUProfile()
59 f, err := os.Create(memprofile)
63 pprof.WriteHeapProfile(f)
67 drv, err := drv.NewDrv(infile)
73 fd, err := os.Create(outfile)
80 _, err = fd.WriteString(drv.String())