dt_program.c (178553) | dt_program.c (184696) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* |
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. | 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. 25 */ 26 27#pragma ident "%Z%%M% %I% %E% SMI" 28 29#include <unistd.h> 30#include <strings.h> 31#include <stdlib.h> --- 399 unchanged lines hidden (view full) --- 431 } 432 433 if (i == 0 && fprintf(infop->dthi_out, "void") < 0) 434 return (dt_set_errno(dtp, errno)); 435 436 if (fprintf(infop->dthi_out, ");\n") < 0) 437 return (dt_set_errno(dtp, errno)); 438 | 24 * Use is subject to license terms. 25 */ 26 27#pragma ident "%Z%%M% %I% %E% SMI" 28 29#include <unistd.h> 30#include <strings.h> 31#include <stdlib.h> --- 399 unchanged lines hidden (view full) --- 431 } 432 433 if (i == 0 && fprintf(infop->dthi_out, "void") < 0) 434 return (dt_set_errno(dtp, errno)); 435 436 if (fprintf(infop->dthi_out, ");\n") < 0) 437 return (dt_set_errno(dtp, errno)); 438 |
439 if (fprintf(infop->dthi_out, "extern int " 440 "__dtraceenabled_%s___%s(void);\n", infop->dthi_pfname, fname) < 0) | 439 if (fprintf(infop->dthi_out, 440 "#ifndef\t__sparc\n" 441 "extern int __dtraceenabled_%s___%s(void);\n" 442 "#else\n" 443 "extern int __dtraceenabled_%s___%s(long);\n" 444 "#endif\n", 445 infop->dthi_pfname, fname, infop->dthi_pfname, fname) < 0) |
441 return (dt_set_errno(dtp, errno)); 442 443 return (0); 444} 445 446/*ARGSUSED*/ 447static int 448dt_header_probe(dt_idhash_t *dhp, dt_ident_t *idp, void *data) --- 45 unchanged lines hidden (view full) --- 494 return (dt_set_errno(dtp, errno)); 495 } 496 } 497 498 if (fprintf(infop->dthi_out, ")\n") < 0) 499 return (dt_set_errno(dtp, errno)); 500 501 if (!infop->dthi_empty) { | 446 return (dt_set_errno(dtp, errno)); 447 448 return (0); 449} 450 451/*ARGSUSED*/ 452static int 453dt_header_probe(dt_idhash_t *dhp, dt_ident_t *idp, void *data) --- 45 unchanged lines hidden (view full) --- 499 return (dt_set_errno(dtp, errno)); 500 } 501 } 502 503 if (fprintf(infop->dthi_out, ")\n") < 0) 504 return (dt_set_errno(dtp, errno)); 505 506 if (!infop->dthi_empty) { |
502 if (fprintf(infop->dthi_out, "#define\t%s_%s_ENABLED() \\\n", 503 infop->dthi_pmname, mname) < 0) 504 return (dt_set_errno(dtp, errno)); 505 506 if (fprintf(infop->dthi_out, "\t__dtraceenabled_%s___%s()\n", | 507 if (fprintf(infop->dthi_out, 508 "#ifndef\t__sparc\n" 509 "#define\t%s_%s_ENABLED() \\\n" 510 "\t__dtraceenabled_%s___%s()\n" 511 "#else\n" 512 "#define\t%s_%s_ENABLED() \\\n" 513 "\t__dtraceenabled_%s___%s(0)\n" 514 "#endif\n", 515 infop->dthi_pmname, mname, 516 infop->dthi_pfname, fname, 517 infop->dthi_pmname, mname, |
507 infop->dthi_pfname, fname) < 0) 508 return (dt_set_errno(dtp, errno)); | 518 infop->dthi_pfname, fname) < 0) 519 return (dt_set_errno(dtp, errno)); |
520 |
|
509 } else { 510 if (fprintf(infop->dthi_out, "#define\t%s_%s_ENABLED() (0)\n", 511 infop->dthi_pmname, mname) < 0) 512 return (dt_set_errno(dtp, errno)); 513 } 514 515 return (0); 516} --- 90 unchanged lines hidden --- | 521 } else { 522 if (fprintf(infop->dthi_out, "#define\t%s_%s_ENABLED() (0)\n", 523 infop->dthi_pmname, mname) < 0) 524 return (dt_set_errno(dtp, errno)); 525 } 526 527 return (0); 528} --- 90 unchanged lines hidden --- |