OpenSolaris
Collectives
Discussions
Documentation
Download
Source Browser
Free CD
Log-in
|
en
Community Group on
:
findunref and unreferenced files
Top Menu
Show
:
Comments
Attachments
History
Information
Print
:
Print
Print preview
Export as PDF
Export as RTF
Export as HTML
Export as XAR
Wiki code for
findunref and unreferenced files
Hide Line numbers
1: This is the original email announcing the findunref tool. It needs a bit of updating, but still explains the rationale behind the tool. 2: 3: {{{ 4: 5: Date: Wed, 21 Mar 2001 22:25:19 -0500 (EST) (19:25:19 PST) 6: From: [[Peter Memishian>>/viewProfile.jspa?username=meem]] <meem at sun dot com> 7: Subject: heads-up: findunref and unreferenced files in ON 8: 9: Gatelings, 10: 11: My recent putback adds a new tool to ON called `findunref’. Simply put, 12: findunref allows both developers and gatekeepers to track down files that are 13: never used during the nightly build process. I hope that each of you will 14: take a minute to get familiar with it and make it part of your development 15: environment. 16: 17: You may wonder why we care about unreferenced files. Simply put, unused 18: files in the build are like unused variables in a program: they are signs of 19: brokenness. While there are some legitimate reasons why files are not used 20: during the build process (see "Permitted Unreferenced Files", below), the 21: vast majority of these files are just crud taking up space in our tree. 22: Others are less benign: unused packaging scripts are signs that something is 23: amiss in a package; unused .xcl files are evidence of programs that have not 24: been correctly internationalized. 25: 26: There are currently a staggering ~1100 accidentally unreferenced files in ON 27: ~-- that is, roughly 1 out of every 28 files is accidentally unused. This is 28: an unacceptably high number which we will be working to reduce in the coming 29: months (and years). That said, we understand that most of you are hard at 30: work on your own projects and do not have time to help fight a war against 31: the unreferenced file backlog. 32: 33: However, starting as of now, the gatekeepers will be tracking differences 34: in the unused file list as part of the nightly build. Additionally, any 35: putbacks which introduce new unreferenced files into ON will be required to 36: remedy the problem or be subject to backout. Since you will be required to 37: fix up any unreferenced files that result from your putbacks, you may want 38: to run findunref yourself prior to putback. 39: 40: Using Findunref 41: ~--------------- 42: 43: The findunref tool is quite simple: it merely walks through the files in a 44: source tree and compares the access times of each file against a timestamp 45: file. All files under SCCS control which have not been accessed more 46: recently than the timestamp and are not in a special exception list are 47: considered unreferenced. 48: 49: At the start of each nightly build, nightly touches $SRC/.build.tstamp and 50: then proceeds with the build. Thus, once the build is finished, all files 51: which have not been accessed more recently than $SRC/.build.tstamp were never 52: used by the build. Since findunref’s default timestamp file is .build.tstamp 53: at the root of the specified source tree, running findunref on the $SRC of a 54: completed nightly build will list the files that were unused by the build. 55: 56: Unfortunately, a considerable number of files are only used on SPARC or Intel 57: nightly builds (but not both). As a result, findunref must be run on both 58: SPARC and Intel nightly workspaces and the results must be merged to get the 59: correct list of unreferenced files. For instance, if $INTELSRC and $SPARCSRC 60: are set to the usr/src directories of your Intel and SPARC nightly 61: workspaces, then you must merge the results like: 62: 63: $ findunref $INTELSRC exception_list | sort > ~/unref-i386.out 64: $ findunref $SPARCSRC exception_list | sort > ~/unref-sparc.out 65: $ comm -12 ~/unref-i386.out ~/unref-sparc.out > ~/unref.out 66: 67: In the example above, exception_list can be any file (or /dev/null if there 68: are no exceptions), but should be the same exception list that the gate uses: 69: $SRC/tools/findunref/exception_list. You can then diff your results against 70: the gate’s current list at /ws/on81-gate/usr/src/unrefmaster.out to see any 71: changes that are due to your work (as an aside, if you get odd results, make 72: sure that the `noatime’ option (see mount_ufs(1M)) is turned off on the 73: filesystem that your workspace is on). 74: 75: Since that process is admittedly cumbersome, another approach is to include 76: the new `-f’ flag in NIGHTLY_OPTIONS. This option, which is ignored for 77: incremental builds, tracks any differences in the unreferenced file list from 78: the previous nightly and lists those differences in the mail message. Note 79: of course that this may produce false positives: a new file which is only 80: used on Intel will show up in as a new unreferenced file when a SPARC nightly 81: is next run on the workspace. This option also builds $SRC/unref-$(MACH).out 82: in your nightly workspace, which may be compared at any time against the 83: unref-$(MACH).out files in /ws/on81-gate/usr/src to see changes that are due 84: to your work. 85: 86: Project gatekeepers and enterprising developers may also wish to make use of 87: the enhanced `-u’ option, which when used with `-f’ not only copies the 88: unref-$(MACH).out files to the parent workspace, but also merges all of the 89: parent’s unref-$(MACH).out files into a master file (usr/src/unrefmaster.out 90: in the parent) which may be compared against the gate’s unrefmaster.out to 91: see any changes that are due to your project’s workspace. 92: 93: Permitted Unreferenced Files 94: ~---------------------------- 95: 96: As mentioned previously, we understand that not all unreferenced files 97: indicate problems. For instance, projects are encouraged to include READMEs 98: and other textfiles that aid understanding along with their putback. Other 99: examples of permitted unreferenced files include the source for test 100: programs, goop for internal packages, and files which are part of programs 101: which are maintained externally (such as perl and apache). 102: 103: To handle these cases without continually adding exceptions to the exception 104: list, we are asking developers to follow some common naming conventions for 105: these files. For instance, the current exception list causes findunref to 106: ignore any file ending in ".txt" or starting with "README", so as long as you 107: use these naming conventions with your new textfiles, they will automatically 108: be ignored. There are similar conventions for the source for test programs 109: and other files; please see $(SRC)/tools/findunref/exception_list for the 110: current list of permitted exception globs. 111: 112: Please let me know if you have questions, comments, or issues... 113: ~-- 114: meem 115: 116: }}}
Search
Collectives
Community Group
Academic and Research
Accessibility
Advocacy
Appliances
Approachability
Architecture Process and Tools
BrandZ
Chinese Users
Community Advisory Board
Databases
Desktop
Device Drivers
Distribution
Documentation
DTrace
Emerging Platforms
Fault Management
Games on OpenSolaris
HA Clusters
HPC Developer
Installation and Packaging
Internationalization and Localization
Laptop
Logical Domains
Modular Debugger (MDB)
Networking
NFS
Observability
OpenSolaris Governing Board (OGB)
OpenSolaris Printing
OS/Net (ON)
Performance
Power Management
PowerPC
Security
Service Management Facility (smf(5))
Software Porters
Solaris Volume Manager
Storage
Systems Administration Community Group
Testing
Tools Home
Unix File Systems (UFS)
Website Community
X Window System
Xen
ZFS
Zones
Project
ADSL Modem Enhancement
ARC Process Definition
ARM Platform Port
Automatic Data Migration
BIND Update
Bluetooth Stack & Drivers
Brocade FC HBA - Initiator
Brocade FC HBA - Target
Brussels - unified network link configuration
Caiman, Solaris Install Revisited
Celeste
Český portál
Chime Visualization Tool for DTrace
CIFS client for Solaris
CIFS Server
Clearview: Network Interface Coherence
Cluster Agent: Informix Dynamic Server
Cluster Agent: OpenSolaris Container
Cluster Agent: OpenSolaris xVM
Cluster Agent: Oracle E-Business Suite
Cluster agent: PostgreSQL
Cluster Agent: Samba
Cluster Agent: Tomcat
CMT
Coarse Data Flow Parallelism
Colorado: Open HA Cluster on OpenSolaris
Command Assistant
Common Array Manager
Companion - /opt/sfw: Free and Open Source software
COMSTAR: Common Multiprotocol SCSI Target
Content
Contest
CPU Observability
Credentials Process Groups
Crossbow: Network Virtualization and Resource Control
Crypto KMS Agent Toolkit
Cryptographic Framework
Data Migration Manager
Data Tethers
Deutsches Portal
Device Detection Tool
Device Driver Utility
Device Manager
Device Mapper
Direct Rendering Infrastructure & 3D drivers
DTrace Guide
Duckwater: Simplified name services management
Easy Tools
Emancipation
Emulex Fibre Channel Device Driver
Emulex Advanced Ethernet Device Driver
Enable/Enhance Solaris support for Intel Platform
Enhance the support of USB webcams
Enhanced SMF Profiles
Enhancements for AMD-based Platforms
Erlang DTrace Integration
Ethernet bridge module for Solaris
Evaluate Conary
Events Registry
Ext3 file system support
F/OSS Package Base
Facilitation
Fibre Channel over Ethernet
Fine Grained Access Policy (FGAP)
Fingerprint Authentication
Flexible Mandatory Access Control
Forensic Tools
Fully Open X Project
Fuse on Solaris
gcore
Generic Machine Check Architecture Improvements
Google SOC
HA-JBoss
HA-MySQL
Hadoop Live CD
Hitachi
HoneyComb Fixed Content Storage
HPC Stack
Image Packaging System
Improved Performance MIB
Indiana
Innovation Awards
Input Method
Intel Graphics
Interrupt Resource Management
IP Datapath Refactoring
IP over Infiniband
IPsec Tunnel Reform
iSCSI Extensions for Remote DMA (iSER)
iSNS Server
JeOS - Just enough Operating System
JKstat - a java binding for libkstat
Journaled File System (JFS)
K Desktop Environment
Kerberos
Kernel Sockets
Kernel SSL Enhancements
Key Management Framework
Korn Shell 93 integration/migration project
Labeled IPsec
LatencyTOP
Layer 2 Filtering
LDoms Manager
Lending
libMicro - portable microbenchmarks
Link Layer Discovery
Live Media: Technologies for distributions running from CD and other media
Locale Data
lofi compression and cryptography support
lx64 brand
Media Management System
Mega_sas
Mexico
MilaX minimal Live Distribution
MIPS Platform Port
Mozilla DTrace
MRSL.NONsharedDevice
Multi-lingual Glossary
Multi-pathing software (MPxIO)
Multiple disk sector size support
Multiple DOI
Muskoka: An open repository for OpenSolaris technical content
Navigator
Nemo: A Framework for High-Performance Networking
Network Auto-Magic
Network Data Management Protocol
Network MIBs
Network Storage
Network Time Protocol (NTP)
Nevada Globalization
New Design of 4over6 Mechanism Based on OpenSolaris
NFS RDMA transport update and performance analysis
NFS Server in non-Global Zones
NFS version 4.1 pNFS
NFSv4 namespace extensions
Nightingale: Port Songbird to OpenSolaris
NPort ID Virtualization (NPIV)
NUMA
Object Storage Device (OSD) support for Solaris
OHACGE Script Based Plug-in
ON/Nevada (ONNV) Project
Open Development Infrastructure
Open HA Cluster Utilities
Open Sound System
OpenGrok
OpenPegasus CIM Server
OpenRTI
OpenSolaris Busybox
OpenSolaris Desktop
OpenSolaris Hispano
OpenSolaris Security Audit
OpenSolaris support for the QEMU processor emulator: host and guest
PEF: Packet Event Framework
Performance Wrappers
Pkgfactory
Polski Portal
Portail Francophone
Portal Brasil
Portals
Power Management Usability Interfaces
Presto: Automatic Printing Configuration
Printable Many Page Solaris Manuals
Promise SuperTrak RAID HBA Driver
QLogic Converged Network Adapter GLDv3 NIC Driver
Quagga Routing Protocol Suite Integration
RAID Configuration Utility
RBridge (IETF TRILL) support
RDMA Offload Framework
Reno: Login Process Enhancements for Interop
Resource Management
s10brand
SAM/QFS
SCM Migration Project
SCSI RDMA Protocol
SDcard Drivers
Sensor Abstraction Layer
Session Initiation Protocol
SFW
Shell: bourne shell, korn shell, C shell, etc.
Sierra: Intel WiFi Chipsets Support
Simple Panels
SM-HBA Based SAS HBA Management
SMF Documentation
Solaris iSCSI Target
Solaris PowerPC Port
SourceJuicer
Sparks: name service switch/nscd enhancements
Squashfs
Star integration/migration project
Starfish
Starter Kit
Storage Power Management
Sun Security Toolkit
Sun StorageTek Availability Suite
Support for OpenFabrics User Verbs / API on OpenSolaris OS
Support gcc4/GCCfss in Solaris
Suspend/Resume
SVR4 Packaging
Systemz
Tamarack: Removable Media Enhancements in Solaris
Tesla: OpenSolaris Enhanced Power Management
Test Development
Tickless Kernel Architecture
TIPC
Trademarks
Trusted networking interface policy database for Trusted Extensions
Trusted Platform Module support
Use Case
Validated Execution Project
Virtual Console
Virtual Network Machines
Visual Panels
Visualization for HPC
Volo
VRRP: Virtual Router Redundancy Protocol Implementation
VSCAN service
Web Stack
Website
Winchester: Schema mapping and ID mapping for AD Interoperability
Wireless USB Support
Wireless Wide Area Network
X Consolidation
x86 Generic FMA Topology Enumerator
Xen Gate
Xfce: A lightweight desktop environment
ZFS Boot and Install
ZFS on disk encryption support
Zone Manager
Zone Statistics
Русский портал
البوابة العربية
भारतीय पोर्टल
中国门户
日本ポータル
한국 포탈
User Group
Adelaide
Argentina
Arizona
Atlanta
Baltimore-Washington
Bangalore
Bangkok
Bangladesh
Beijing
Bélem
Berlin
Bhimavaram
Bloomington
Campus Ambassadors
Capital Region
Cardiff
Charlotte
Chengdu
Chennai
Chihuahua
Chile
Cleveland
Colombia
Columbus
Connecticut
Cracow
Czech
Dallas/Ft. Worth
Danish
Delaware
Edinburgh
Egypt
Finland
Florida
Front Range
FuZhou
Great Lakes
Greece
Hangzhou
Hawaii
HeFei
Houston
Hyderabad
Indonesia
Irish
Israel
Italian
Jinan
Kabul
Kansas City
Latvia
London
Madurai
Manchester
Mato Grosso
Melbourne
Minas Gerais
Minnesota
Montreal
Moscow
Mumbai
Munich
NEA
Netherlands
New England
New York City
New Zealand
NIT Hamirpur
Noroeste
Oklahoma City
Osnabrück
Peru
Philadelphia
Piaski
Pittsburgh
Porto Alegre
Puget Sound
Pune
Queensland
Research Triangle Park
Romania
Russia
San Antonio
San Diego
San Francisco
São Paulo
Scottish
Serbia
Shanghai
Shenzhen
Silicon Valley
Singapore
Slovak
South African
Southern Connecticut
St. Louis
Sweden
Switzerland
Sydney
Szczecin
Taiwan
Tecum
Thames Valley
Tokyo
Toronto
Trondheim
Tulsa
Turkey
Ukraine
University of Melbourne
Vale do Paraíba
Vancouver
Venezuela
Welsh - Cymru
Wisconsin
Xi'an
Subsites
Code Reviews
Code Repositories
Package Search
Bugster
Bugzilla
Test Machines
Planet
Mailing Lists
Elections & Polls
ARC Case Logs
Source Juicer
Package Factory
User Authentication
Community Group on Pages
CRT
Advocates & Sponsors
Becoming a Sponsor
Becoming a CRT Advocate
Charter
RTI nits to avoid
Sponsor Tasks
Developing Solaris
Quality Death Spiral
Developer's Reference
Introduction
Prerequisites
The Source Tree, part 1
The Source Tree, part 2
Building OpenSolaris
Installing and Testing OpenSolaris
Integration Procedure
Best Practices and Requirements
Glossary
findunref and unreferenced files
ONNV Flag Days, Heads Ups, and Project Integration History
Builds 101-105
Builds 106-110
Builds 111-115
Builds 116-120
Builds 121-125
Builds 126-130
Builds 21-25
Builds 26-30
Builds 31-35
Builds 36-40
Builds 41-45
Builds 46-50
Builds 51-55
Builds 56-60
Builds 61-65
Builds 66-70
Builds 71-75
Builds 76-80
Builds 81-85
Builds 86-90
Builds 91-95
Builds 96-100
Installation (from source) Quickstart
Annotated nightly(1) Mail Example
Currently Known Issues
Putback Logs
Development Process
Schedule
Bourne/Korn Shell Coding Conventions
wx