11cb0ef41Sopenharmony_ci// Copyright 2012 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci// Redistribution and use in source and binary forms, with or without 31cb0ef41Sopenharmony_ci// modification, are permitted provided that the following conditions are 41cb0ef41Sopenharmony_ci// met: 51cb0ef41Sopenharmony_ci// 61cb0ef41Sopenharmony_ci// * Redistributions of source code must retain the above copyright 71cb0ef41Sopenharmony_ci// notice, this list of conditions and the following disclaimer. 81cb0ef41Sopenharmony_ci// * Redistributions in binary form must reproduce the above 91cb0ef41Sopenharmony_ci// copyright notice, this list of conditions and the following 101cb0ef41Sopenharmony_ci// disclaimer in the documentation and/or other materials provided 111cb0ef41Sopenharmony_ci// with the distribution. 121cb0ef41Sopenharmony_ci// * Neither the name of Google Inc. nor the names of its 131cb0ef41Sopenharmony_ci// contributors may be used to endorse or promote products derived 141cb0ef41Sopenharmony_ci// from this software without specific prior written permission. 151cb0ef41Sopenharmony_ci// 161cb0ef41Sopenharmony_ci// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 171cb0ef41Sopenharmony_ci// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 181cb0ef41Sopenharmony_ci// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 191cb0ef41Sopenharmony_ci// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 201cb0ef41Sopenharmony_ci// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 211cb0ef41Sopenharmony_ci// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 221cb0ef41Sopenharmony_ci// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 231cb0ef41Sopenharmony_ci// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 241cb0ef41Sopenharmony_ci// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 251cb0ef41Sopenharmony_ci// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 261cb0ef41Sopenharmony_ci// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ciimport { ArgumentsProcessor, TickProcessor } from "./tickprocessor.mjs"; 291cb0ef41Sopenharmony_ci 301cb0ef41Sopenharmony_ciconst params = ArgumentsProcessor.process(arguments); 311cb0ef41Sopenharmony_ciconst tickProcessor = TickProcessor.fromParams(params); 321cb0ef41Sopenharmony_ciawait tickProcessor.processLogFile(params.logFileName); 331cb0ef41Sopenharmony_ciif (params.serializeVMSymbols) { 341cb0ef41Sopenharmony_ci tickProcessor.printVMSymbols(); 351cb0ef41Sopenharmony_ci} else { 361cb0ef41Sopenharmony_ci tickProcessor.printStatistics(); 371cb0ef41Sopenharmony_ci} 38